Sha256: cab8fbd2ec99a8aa4e356b960430ae97ac04ddf0e82eb386555c0323e0f42ff3

Contents?: true

Size: 459 Bytes

Versions: 19

Compression:

Stored size: 459 Bytes

Contents

# frozen_string_literal: true

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

    def ckeditor5_preset(name = nil, &block)
      return CKEditor5::Rails::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

19 entries across 19 versions & 1 rubygems

Version Path
ckeditor5-1.19.5 lib/ckeditor5/rails/editor/helpers/config_helpers.rb
ckeditor5-1.19.4 lib/ckeditor5/rails/editor/helpers/config_helpers.rb
ckeditor5-1.19.3 lib/ckeditor5/rails/editor/helpers/config_helpers.rb
ckeditor5-1.19.2 lib/ckeditor5/rails/editor/helpers/config_helpers.rb
ckeditor5-1.19.1 lib/ckeditor5/rails/editor/helpers/config_helpers.rb
ckeditor5-1.19.0 lib/ckeditor5/rails/editor/helpers/config_helpers.rb
ckeditor5-1.18.3 lib/ckeditor5/rails/editor/helpers/config_helpers.rb
ckeditor5-1.18.1 lib/ckeditor5/rails/editor/helpers/config_helpers.rb
ckeditor5-1.18.0 lib/ckeditor5/rails/editor/helpers/config_helpers.rb
ckeditor5-1.17.4 lib/ckeditor5/rails/editor/helpers/config_helpers.rb
ckeditor5-1.17.3 lib/ckeditor5/rails/editor/helpers/config_helpers.rb
ckeditor5-1.17.2 lib/ckeditor5/rails/editor/helpers/config_helpers.rb
ckeditor5-1.17.1 lib/ckeditor5/rails/editor/helpers/config_helpers.rb
ckeditor5-1.17.0 lib/ckeditor5/rails/editor/helpers/config_helpers.rb
ckeditor5-1.16.2 lib/ckeditor5/rails/editor/helpers/config_helpers.rb
ckeditor5-1.16.1 lib/ckeditor5/rails/editor/helpers/config_helpers.rb
ckeditor5-1.16.0 lib/ckeditor5/rails/editor/helpers/config_helpers.rb
ckeditor5-1.15.10 lib/ckeditor5/rails/editor/helpers/config_helpers.rb
ckeditor5-1.15.9 lib/ckeditor5/rails/editor/helpers/config_helpers.rb