Use text_area instead of cktext_area
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.
This commit is contained in:
@@ -9,7 +9,7 @@ class ConsulFormBuilder < FoundationRailsHelper::FormBuilder
|
||||
select attribute, choices, options, html_options
|
||||
end
|
||||
|
||||
%i[text_field text_area cktext_area number_field password_field email_field].each do |field|
|
||||
%i[text_field text_area number_field password_field email_field].each do |field|
|
||||
define_method field do |attribute, options = {}|
|
||||
label_with_hint(attribute, options.merge(label_options: label_options_for(options))) +
|
||||
super(attribute, options.merge(
|
||||
|
||||
Reference in New Issue
Block a user