Class: CKEditor5::Rails::Editor::PropsPlugin
- Inherits:
-
PropsBasePlugin
- Object
- PropsBasePlugin
- CKEditor5::Rails::Editor::PropsPlugin
- Defined in:
- lib/ckeditor5/rails/editor/props_plugin.rb
Instance Attribute Summary
Attributes inherited from PropsBasePlugin
Instance Method Summary collapse
-
#initialize(name, premium: false, **js_import_meta_attrs) ⇒ PropsPlugin
constructor
A new instance of PropsPlugin.
- #to_h ⇒ Object
Methods inherited from PropsBasePlugin
normalize, #preload_assets_bundle
Constructor Details
#initialize(name, premium: false, **js_import_meta_attrs) ⇒ PropsPlugin
Returns a new instance of PropsPlugin.
7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
# File 'lib/ckeditor5/rails/editor/props_plugin.rb', line 7 def initialize(name, premium: false, **) super(name) [:import_name] ||= if premium 'ckeditor5-premium-features' else 'ckeditor5' end @js_import_meta = ::CKEditor5::Rails::Assets::JSImportMeta.new( import_as: [:window_name] ? nil : name, ** ) end |
Instance Method Details
#to_h ⇒ Object
22 23 24 |
# File 'lib/ckeditor5/rails/editor/props_plugin.rb', line 22 def to_h @js_import_meta.to_h.merge(type: :external) end |