Class: CKEditor5::Rails::Engine

Inherits:
Rails::Engine
  • Object
show all
Defined in:
lib/ckeditor5/rails/engine.rb

Defined Under Namespace

Classes: ConfigurationProxy

Class Method Summary collapse

Class Method Details

.baseObject



34
35
36
# File 'lib/ckeditor5/rails/engine.rb', line 34

def base
  config.ckeditor5
end

.configure(&block) ⇒ Object



42
43
44
45
# File 'lib/ckeditor5/rails/engine.rb', line 42

def configure(&block)
  proxy = ConfigurationProxy.new(config.ckeditor5)
  proxy.instance_eval(&block)
end

.default_presetObject



38
39
40
# File 'lib/ckeditor5/rails/engine.rb', line 38

def default_preset
  config.ckeditor5.presets.default
end

.find_preset(preset) ⇒ Object



47
48
49
50
51
# File 'lib/ckeditor5/rails/engine.rb', line 47

def find_preset(preset)
  return preset if preset.is_a?(CKEditor5::Rails::Presets::PresetBuilder)

  base.presets[preset]
end