Sha256: 3876bc51c0fc0c9ce8c248919b4d9e23fe655fd9e299a81f16c7ab3aa357a7e6

Contents?: true

Size: 441 Bytes

Versions: 8

Compression:

Stored size: 441 Bytes

Contents

# frozen_string_literal: true

module CKEditor5::Rails
  module Editor::Helpers::Config
    def ckeditor5_element_ref(selector)
      { '$element': selector }
    end

    def ckeditor5_preset(name = nil, &block)
      return Engine.find_preset(name) if name

      raise ArgumentError, 'Configuration block is required for preset definition' unless block_given?

      CKEditor5::Rails::Presets::PresetBuilder.new(&block)
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
ckeditor5-1.15.8 lib/ckeditor5/rails/editor/helpers/config_helpers.rb
ckeditor5-1.15.7 lib/ckeditor5/rails/editor/helpers/config_helpers.rb
ckeditor5-1.15.2 lib/ckeditor5/rails/editor/helpers/config_helpers.rb
ckeditor5-1.15.1 lib/ckeditor5/rails/editor/helpers/config_helpers.rb
ckeditor5-1.15.0 lib/ckeditor5/rails/editor/helpers/config_helpers.rb
ckeditor5-1.14.1 lib/ckeditor5/rails/editor/helpers/config_helpers.rb
ckeditor5-1.14.0 lib/ckeditor5/rails/editor/helpers/config_helpers.rb
ckeditor5-1.12.0 lib/ckeditor5/rails/editor/helpers/config_helpers.rb