Class: CKEditor5::Rails::Plugins::WProofreader
- Inherits:
-
Editor::PropsExternalPlugin
- Object
- Editor::PropsBasePlugin
- Editor::PropsExternalPlugin
- CKEditor5::Rails::Plugins::WProofreader
- Defined in:
- lib/ckeditor5/rails/plugins/wproofreader.rb
Constant Summary collapse
- DEFAULT_VERSION =
'3.1.2'
- DEFAULT_CDN =
'https://cdn.jsdelivr.net/npm/@webspellchecker/wproofreader-ckeditor5'
Instance Attribute Summary
Attributes inherited from Editor::PropsExternalPlugin
Attributes inherited from Editor::PropsBasePlugin
Instance Method Summary collapse
-
#initialize(version: nil, cdn: nil) ⇒ WProofreader
constructor
A new instance of WProofreader.
Methods inherited from Editor::PropsExternalPlugin
Methods inherited from Editor::PropsBasePlugin
normalize, #preload_assets_bundle, #to_h
Constructor Details
#initialize(version: nil, cdn: nil) ⇒ WProofreader
Returns a new instance of WProofreader.
10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
# File 'lib/ckeditor5/rails/plugins/wproofreader.rb', line 10 def initialize(version: nil, cdn: nil) cdn ||= DEFAULT_CDN version ||= DEFAULT_VERSION script_url = "#{cdn}@#{version}/dist/browser/index.js" style_url = "#{cdn}@#{version}/dist/browser/index.css" super( :WProofreader, script: script_url, import_as: 'WProofreader', stylesheets: [style_url], ) end |