We're going to change CKEditor to an inline editor, and the "ckeditor" gem doesn't provide an option to do so. Since using `cktext_area` would automatically generate a "classic" iframe CKEditor, we need to use `text_area` and load the editor using JavaScript. Personally I prefer this option anyway. Note in the jQuery selector we need to use `textarea.html-area`; using just `.html-area` would fail if there's an error message associated to the textarea, since Rails will add the `.html-area` class to the error message.
14 lines
465 B
Plaintext
14 lines
465 B
Plaintext
<%= form_for [:admin, @newsletter] do |f| %>
|
|
<%= render "shared/errors", resource: @newsletter %>
|
|
|
|
<%= f.select :segment_recipient, options_for_select(user_segments_options,
|
|
@newsletter[:segment_recipient]) %>
|
|
<%= f.text_field :subject %>
|
|
<%= f.text_field :from %>
|
|
<%= f.text_area :body, class: "html-area" %>
|
|
|
|
<div class="margin-top">
|
|
<%= f.submit class: "button success" %>
|
|
</div>
|
|
<% end %>
|