module Liquid module Locomotive module Tags class InlineEditor < ::Liquid::Tag def render(context) if context.registers[:current_locomotive_account] && context.registers[:inline_editor] plugins = 'common/format,common/table,common/list,common/link,common/highlighteditables,common/block,common/undo,common/contenthandler,common/paste,common/commands,common/abbr,common/horizontalruler' %{ #{ActionController::Base.helpers.stylesheet_link_tag 'aloha/css/aloha.css'} #{ActionController::Base.helpers.javascript_include_tag 'locomotive/aloha', :'data-aloha-plugins' => plugins} } else '' end end end ::Liquid::Template.register_tag('inline_editor', InlineEditor) end end end