respect custom styles in fullscreen mode - #615
Open
i-just wants to merge 1 commit into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Description
All the Custom Styles provided in the field’s configuration are automatically wrapped in an ID that references the field’s handle (e.g.
#fields-input-ckeditor-myCkeditorFieldif the field’s handle ismyCkeditorField). This ensures that if you have multiple CKE fields on a single page that use different styles, those styles are applied only to the relevant editor areas. (https://github.com/craftcms/ckeditor/blob/5.6.1/src/Field.php#L1876)When you enter a fullscreen mode, CKEditor appends a new container to the
bodyelement and copies the editor in there - only the editor, not the surrounding wrappers, so that ID is no longer applicable, which causes the custom styles to be ignored.Fix: add the same identifier to the fullscreen mode container (but this time as a class), ensure that any custom configuration that the user might have provided for the fullscreen feature is still respected and add that class qualifier to the Custom Styles wrapper.
Related issues
#614