Sha256: 538f9d582e4e2969fb7c53f366a0a859359bfbd0fa040d333decb6906fc0dd3a
Contents?: true
Size: 714 Bytes
Versions: 148
Compression:
Stored size: 714 Bytes
Contents
module EffectiveEditorHelper def effective_editor_tag(content, options = {}) content = content.presence || '{}' content_mode = ( if options.delete(:delta) :delta elsif options.delete(:html) :html elsif options.delete(:code) :code else :delta end ) input_js = { method_name: 'effective_editor_tag', theme: 'snow', readOnly: true, content_mode: content_mode, modules: { toolbar: false, syntax: (content_mode == :code) } } content_tag(:div, '', id: "ql-#{content.object_id}", class: 'effective_editor_content ql-effective', data: { 'input-js-options': input_js, 'content': content }) end end
Version data entries
148 entries across 148 versions & 1 rubygems