Skip to content

respect custom styles in fullscreen mode - #615

Open
i-just wants to merge 1 commit into
5.xfrom
bugfix/614-custom-styles-and-fullscreen-mode
Open

respect custom styles in fullscreen mode#615
i-just wants to merge 1 commit into
5.xfrom
bugfix/614-custom-styles-and-fullscreen-mode

Conversation

@i-just

@i-just i-just commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

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-myCkeditorField if the field’s handle is myCkeditorField). 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 body element 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

@i-just
i-just requested a review from brandonkelly as a code owner August 7, 2026 09:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant