Sha256: b8a91d0d2a455b7b4e8ac62f74a6bf0a2c533120365a18c58c8cd8042dc67b58
Contents?: true
Size: 672 Bytes
Versions: 13
Compression:
Stored size: 672 Bytes
Contents
# frozen_string_literal: true module Decidim # Helper related to organization' setting :rich_text_editor_in_public_views. module RichTextEditorHelper def self.included(base) base.include Decidim::SanitizeHelper end delegate :rich_text_editor_in_public_views?, to: :current_organization def text_editor_for(form, attribute, options = {}) if rich_text_editor_in_public_views? options[:lines] ||= 25 options[:context] ||= "participant" form.editor attribute, options else options.delete(:hashtaggable) options[:rows] ||= 10 form.text_area attribute, options end end end end
Version data entries
13 entries across 13 versions & 1 rubygems