Class: CKEditor5::Rails::Editor::PropsInlinePlugin

Inherits:
Object
  • Object
show all
Defined in:
lib/ckeditor5/rails/editor/props_inline_plugin.rb

Instance Method Summary collapse

Constructor Details

#initialize(name, code) ⇒ PropsInlinePlugin

Returns a new instance of PropsInlinePlugin.



5
6
7
8
9
# File 'lib/ckeditor5/rails/editor/props_inline_plugin.rb', line 5

def initialize(name, code)
  @name = name
  @code = code
  validate_code!
end

Instance Method Details

#to_hObject



11
12
13
14
15
16
17
# File 'lib/ckeditor5/rails/editor/props_inline_plugin.rb', line 11

def to_h
  {
    type: :inline,
    name: name,
    code: code
  }
end