Module: Decidim::RichTextEditorHelper
- Included in:
- AmendmentsHelper
- Defined in:
- app/helpers/decidim/rich_text_editor_helper.rb
Overview
Helper related to organization’ setting :rich_text_editor_in_public_views.
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.included(base) ⇒ Object
6 7 8 |
# File 'app/helpers/decidim/rich_text_editor_helper.rb', line 6 def self.included(base) base.include Decidim::SanitizeHelper end |
Instance Method Details
#text_editor_for(form, attribute, options = {}) ⇒ Object
12 13 14 15 16 17 18 19 20 21 22 |
# File 'app/helpers/decidim/rich_text_editor_helper.rb', line 12 def text_editor_for(form, attribute, = {}) if rich_text_editor_in_public_views? [:lines] ||= 25 [:context] ||= "participant" form.editor attribute, else .delete(:hashtaggable) [:rows] ||= 10 form.text_area attribute, end end |