feat: new plugin configuration method #191
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What does it do?
Introduces a new
setPluginConfig
method to configure the plugin in the front-end environment. This method must be invoked before the admin panel's bootstrap lifecycle function.Example:
Why is it needed?
Configuring CKEditor (a front-end plugin) directly in the front-end environment makes it easier to handle non serializable data types. This approach eliminates crutches such as: the need to write configurations in the Node.js environment, convert them to text, and expose them as global variables. With this update, all editor plugins can be imported directly alongside their configuration objects as expected, without the need to expose them to the global object.
Breaking Changes
ckeditor.js|ts
file is no longer supported for plugin configuration. The plugin now requires using thesetPluginConfig
method for configuration. Existing setups must be updated to call this method before the admin panel's bootstrap lifecycle.field
property has been replaced byname
anddescription
properties.dontMergePresets
anddontMergeTheme
options have been removed. User-provided configuration objects now completely overwrite the default ones.