class CopyToClipboard < Liquid::Tag def initialize(tagName, markup, tokens) super @text = markup end def render(context) text = @text.strip.gsub(/^'|"/, '').gsub(/'|"$/, '') <<-HTML
#{text}
HTML end Liquid::Template.register_tag "copyArea", self end