You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Because of that, when schema in CKBox is being registered, the ImageBlock and ImageInline are not loaded yet. That's why in the code below the attribute ckboxImageId is not registered for images.
There is a similar problem with usage CKBox and BlockToolbar, the order influenced loading. Discussed internally:
Why CKBoxUI registers the ckbox button in the component factory upon afterInit()? There is no comment. There are no tests that verify that. What was the reason? (it causes problems with plugin initialisation and block toolbar)
(...) I believe, we used afterInit() due to
// Do not register the `ckbox` button if the command does not exist. if ( !editor.commands.get( 'ckbox' ) ) { return; }
Fix (ckbox): Plugin order should not matter when it comes to registering schema for `ckboxImageId` attribute. Closes#15581.
Fix (ui): BlockToolbar and BalloonToolbar plugins order should not matter when it comes to registering toolbar items. Closes#15581.
MINOR BREAKING CHANGE (ui): The contents of the `BlockToolbar` and `BalloonToolbar` are now filled on the `EditorUIReadyEvent` instead of `afterInit()`.
π Provide detailed reproduction steps (if any)
CKBox
plugin before the ΒImageBlock
andImageInline
plugins.βοΈ Expected result
The
ckboxImageId
attribute stays.β Actual result
The
ckboxImageId
is dropped.β Possible solution
Discovered in docs. The reason for this is that in the
build-classic.js
snippet we addCKBox
before theImage
:ckeditor5/docs/_snippets/build-classic.js
Lines 41 to 45 in 0e28a3f
Because of that, when schema in CKBox is being registered, the
ImageBlock
andImageInline
are not loaded yet. That's why in the code below the attributeckboxImageId
is not registered for images.ckeditor5/packages/ckeditor5-ckbox/src/ckboxediting.ts
Lines 122 to 128 in 0e28a3f
There is a similar problem with usage
CKBox
andBlockToolbar
, the order influenced loading. Discussed internally:But this
π Other details
If you'd like to see this fixed sooner, add a π reaction to this post.
The text was updated successfully, but these errors were encountered: