Closed dil-bparihar closed 2 weeks ago
Thanks for report, I'll check that.
@dil-bparihar It looks like it works correctly, maybe I have to update docs. The problem is that you have to specify preset
in ckeditor5_editor
instead of ckeditor5_assets
. ckeditor5_assets
uses presets only to determine if ckbox or premium features need to be loaded, other configuration of preset is ignored in resource loader, and preset is no longer forwarded to ckeditor5_editor
. In other words:
:x: Bad
- content_for :head
= ckeditor5_assets preset: :basic
= ckeditor5_editor do
| Hello World
This ckeditor5_editor
will use default
preset, but ckeditor5_assets
will try to determine if premium assets should be loaded based on basic
preset.
:heavy_check_mark: Good
- content_for :head
= ckeditor5_assets preset: :basic
= ckeditor5_editor preset: :basic do
| Hello World
or even
- content_for :head
= ckeditor5_assets premium: <set proper flag to true if any of the editors use premium features>
= ckeditor5_editor preset: :basic do
| Hello World
= ckeditor5_editor preset: :advanced do
| Hello World
I changed this behavior in 1.6.1
version, please see comment below.
@dil-bparihar I updated this behavior, now preset
should be inherited from ckeditor5_assets
if it's used in nested editors. It can be overridden, though. Please install 1.6.1
version.
β So now this behavior is correct:
- content_for :head
= ckeditor5_assets preset: :basic
# This one will use `:basic` preset
= ckeditor5_editor do
| Hello World
Thanks it is working now
π Bug Report
Presets with inherit: false Not Working as Expected
π Bug Description
I am encountering an issue when defining multiple CKEditor 5 presets with different toolbars and plugins. Specifically, when I define presets with inherit: false, only the first preset (which doesn't use inherit: false) is being applied correctly, and all other presets are ignored, regardless of the preset name used in the HTML for ckeditor5_assets.
The presets are not being loaded or rendered as configured when inherit: false is specified, even though the rest of the code seems correct. Hereβs the sample code I am using for the presets configuration:
π Steps to Reproduce
β Expected Behavior
A clear and concise description of what you expected to happen.
β Actual Behavior
πΈ Screenshots
If applicable, add screenshots to help explain your problem.
π Additional Context