Class: CKEditor5::Rails::Editor::InlinePluginWindowInitializer

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

Instance Method Summary collapse

Constructor Details

#initialize(plugin) ⇒ InlinePluginWindowInitializer

Returns a new instance of InlinePluginWindowInitializer.



31
32
33
# File 'lib/ckeditor5/rails/editor/props_inline_plugin.rb', line 31

def initialize(plugin)
  @plugin = plugin
end

Instance Method Details

#to_html(nonce: nil) ⇒ Object



35
36
37
38
39
# File 'lib/ckeditor5/rails/editor/props_inline_plugin.rb', line 35

def to_html(nonce: nil)
  code = wrap_with_handlers(@plugin.code)

  tag.script(code.html_safe, nonce: nonce)
end