Sha256: 2e76fc9a6588f747cdfcc5dddf2fdce3a7f3b4ba4addeced7e08dca40000d2ef
Contents?: true
Size: 628 Bytes
Versions: 46
Compression:
Stored size: 628 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 form.editor attribute, options else options.delete(:hashtaggable) options[:rows] ||= 10 form.text_area attribute, options end end end end
Version data entries
46 entries across 46 versions & 1 rubygems