Sha256: cb5dca5f514ad5246aebc380bd68e9452066235278e8105e8a73fbf0aa67200b

Contents?: true

Size: 887 Bytes

Versions: 73

Compression:

Stored size: 887 Bytes

Contents

<% text_editor = Pulitzer.text_editor_toolbars.detect { |toolbar| toolbar[:name] == content_element.text_editor } %>

<% input_params = {placeholder: 'Body', id: dom_id(content_element, :textarea)} %>
<% unless 'None' == text_editor[:name] %>
  <% if 'WysiHtml' == text_editor[:kind] %>
    <%= render partial: text_editor[:template] %>
    <% input_params[:data] = { rich_text_editor: text_editor[:kind], editor_selector: dom_target(content_element, :textarea) } %>
  <% end %>
  <% if 'TinyMCE' == text_editor[:kind] %>
    <% input_params[:data] = { rich_text_editor: text_editor[:kind], editor_selector: dom_target(content_element, :textarea), mce_params: text_editor[:params].to_json } %>
  <% end %>
<% end %>

<% input_params[:value] = Kramdown::Document.new(f.object.body, input: 'html').to_kramdown if 'Kramdown' == text_editor[:kind] %>
<%= f.text_area(:body, input_params) %>

Version data entries

73 entries across 73 versions & 1 rubygems

Version Path
pulitzer-0.12.4 app/views/pulitzer/content_elements/_text_fields.html.erb
pulitzer-0.12.3 app/views/pulitzer/content_elements/_text_fields.html.erb
pulitzer-0.12.2 app/views/pulitzer/content_elements/_text_fields.html.erb
pulitzer-0.12.1 app/views/pulitzer/content_elements/_text_fields.html.erb
pulitzer-0.12.0 app/views/pulitzer/content_elements/_text_fields.html.erb
pulitzer-0.11.3 app/views/pulitzer/content_elements/_text_fields.html.erb
pulitzer-0.11.2 app/views/pulitzer/content_elements/_text_fields.html.erb
pulitzer-0.11.1 app/views/pulitzer/content_elements/_text_fields.html.erb
pulitzer-0.11.0 app/views/pulitzer/content_elements/_text_fields.html.erb
pulitzer-0.10.3 app/views/pulitzer/content_elements/_text_fields.html.erb
pulitzer-0.10.2 app/views/pulitzer/content_elements/_text_fields.html.erb
pulitzer-0.10.1 app/views/pulitzer/content_elements/_text_fields.html.erb
pulitzer-0.10.0 app/views/pulitzer/content_elements/_text_fields.html.erb
pulitzer-0.5.14 app/views/pulitzer/content_elements/_text_fields.html.erb
pulitzer-0.5.13 app/views/pulitzer/content_elements/_text_fields.html.erb
pulitzer-0.5.11 app/views/pulitzer/content_elements/_text_fields.html.erb
pulitzer-0.5.10 app/views/pulitzer/content_elements/_text_fields.html.erb
pulitzer-0.5.9 app/views/pulitzer/content_elements/_text_fields.html.erb
pulitzer-0.5.8 app/views/pulitzer/content_elements/_text_fields.html.erb
pulitzer-0.5.7 app/views/pulitzer/content_elements/_text_fields.html.erb