module Scrivito module EditingHelper def include_editing_stylesheet if inplace_editing_allowed? stylesheet_link_tag :scrivito_editing end 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 render 'scrivito/editing_javascript' if inplace_editing_allowed? end def scrivito_client_config client_config = ClientConfig.new(@obj, cms_editing_context, lookup_context) if @scrivito_open_details_page client_config.open_resource_dialog(@scrivito_binary_id, @scrivito_return_to); end client_config.to_json.html_safe end end end