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

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

Direct Known Subclasses

Plugins::SimpleUploadAdapter

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name, code) ⇒ PropsInlinePlugin

Returns a new instance of PropsInlinePlugin.



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

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

Instance Attribute Details

#codeObject (readonly)

Returns the value of attribute code.



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

def code
  @code
end

#nameObject (readonly)

Returns the value of attribute name.



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

def name
  @name
end

Instance Method Details

#to_hObject



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

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