Class: HtmlEditorInput
- Inherits:
-
Formtastic::Inputs::TextInput
- Object
- Formtastic::Inputs::TextInput
- HtmlEditorInput
- Defined in:
- app/inputs/html_editor_input.rb
Instance Method Summary collapse
Instance Method Details
#policy ⇒ Object
6 7 8 |
# File 'app/inputs/html_editor_input.rb', line 6 def policy ActiveAdmin::Editor::Policy.new end |
#to_html ⇒ Object
15 16 17 18 19 20 21 22 23 |
# File 'app/inputs/html_editor_input.rb', line 15 def to_html html = '<div class="wrap">' html << builder.text_area(method, ) html << '</div>' html << '<div style="clear: both"></div>' input_wrapping do label_html << html.html_safe end end |
#upload_enabled? ⇒ Boolean
2 3 4 |
# File 'app/inputs/html_editor_input.rb', line 2 def upload_enabled? ActiveAdmin::Editor.configuration.s3_configured? end |
#wrapper_html_options ⇒ Object
10 11 12 13 |
# File 'app/inputs/html_editor_input.rb', line 10 def return super unless upload_enabled? super.merge( :data => { :policy => policy.to_json }) end |