module Scrivito module EditingHelper def generator_meta_tag content = 'Scrivito by Infopark AG (scrivito.com)' content << "; Version #{GemInfo.version}" if inplace_editing_allowed? tag :meta, name: 'generator', content: content end def include_editing_stylesheet (inplace_editing_allowed? ? stylesheet_link_tag(:scrivito_editing) : '').html_safe end def widget_reset_stylesheet stylesheet = '*[data-scrivito-field-type="widget"],' \ ' *[data-scrivito-private-widget-id] { position: relative; }' content_tag(:style, stylesheet, {type: 'text/css'}, false) end def include_editing_javascript (inplace_editing_allowed? ? render('scrivito/editing_javascript') : '').html_safe end def scrivito_client_config client_config = ClientConfig.new(@obj, cms_editing_context, lookup_context, resource: @scrivito_resource, return_to: params[:return_to]) client_config.to_json.html_safe end end end