Problem/Motivation

Currently the CKEditor 5 is missing the full screen editing feature which was available in CKEditor 4. Since the switch to CKEditor 5 is forced with Drupal 10 content creators will be forced to the standard width provided by the theme. In case of the admin theme this could be problematic.

There is a discussion at Github that summarizes why that feature is necessary: https://github.com/ckeditor/ckeditor5/issues/1235

Steps to reproduce

1. Open a Drupal interface that uses CKEditor as its rich text editor.
2. Attempt to make the editing interface display full-screen, as is available in CKEditor 5 core as of v45.0.0 (https://ckeditor.com/docs/ckeditor5/latest/features/fullscreen.html?docI...)
3. Observe that there is no toolbar option for entering full-screen mode.

Proposed resolution

Register the CKEditor 5 base fullscreen.js plugin as an available library Drupal.

Remaining tasks

N/A

User interface changes

Text formats using CKEditor 5 can be configured to include the FullScreen plugin, which lets users temporarily expand the editor to the whole browser viewport, giving you more space to comfortably edit content and use editor’s UI features.

API changes

N/A

Data model changes

N/A

Release notes snippet

Text formats using CKEditor 5 have available the FullScreen plugin which, when added to a text format toolbar, lets user temporarily expand the editor to the whole browser viewport, giving more space to comfortably edit content and use editor’s UI features.

Issue fork drupal-3331158

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

Nchase created an issue. See original summary.

wim leers’s picture

Woah, we totally missed how this would be important to some users. But the fact that you're the first to complain about this in the ~1.5 year I've worked on CKEditor 5 does indicate this is fairly rarely used … 😅

This was last discussed in #3211049 — see #3211049-5: [META] Add all plugins which are available in Drupal core's build of CKEditor 4 and subsequent comments.

xjm’s picture

Title: Full screen editing - distraction free mode » Support full-screen editing - distraction free mode when it is available upstream
Category: Feature request » Task
Priority: Normal » Major
Status: Active » Postponed
Issue tags: +Usability, +Accessibility

This is a usability and accessibility issue, so changing status and priority accordingly.

However, we likely won't be able to implement it in core until it's implemented upstream, so postponing on the upstream discussion.

Thanks for reporting this!

wim leers’s picture

Title: Support full-screen editing - distraction free mode when it is available upstream » [upstream] Support full-screen editing - distraction free mode when it is available upstream
Issue tags: +Needs upstream feature

Thanks, @xjm, and agreed! 😊

stefvanlooveren’s picture

Damn, getting lots of requests for this feature :-).

mherchel’s picture

FWIW, I miss this feature also.

wim leers’s picture

Vote upstream, please! 🙏😊

mgifford’s picture

Issue tags: +wcag336

This is definitely something that would help with ATAG, but not sure it fits one of their criteria. Not sure if it fits under Cognitive https://www.w3.org/WAI/cognitive/

I can see it part of SC 3.3.6: Error Prevention though.

cmcnamee’s picture

Issue tags: -wcag336

Has anyone created a temporary solution to this in the meantime? We have a project with requirement of cke5 fullscreen.

joelpittet’s picture

If someone's feeling brave they can take this for a spin: https://github.com/leknoppix/ckeditor5-fullscreen (From the upstream comments)

mgifford’s picture

Issue tags: +wcag336

@cmcnamee did you remove the tag wcag336 on purpose? Looks like it was accidental so am adding it back.

cmcnamee’s picture

That's strange, I didn't even expand the metadata box when commenting, so I'm not sure how the tag got removed. Thanks for adding it back in.

mgifford’s picture

Sometimes it is just bad timing..

nchase’s picture

thanks for looking into this! Highly appreciated!

hoporr’s picture

Sorely missed. I guess I won't be using CK5 until I have to.

jonmarshall’s picture

Thanks for considering this. It's essential to many content editors that I'm working with.

Version: 10.1.x-dev » 11.x-dev

Drupal core is moving towards using a “main” branch. As an interim step, a new 11.x branch has been opened, as Drupal.org infrastructure cannot currently fully support a branch named main. New developments and disruptive changes should now be targeted for the 11.x branch, which currently accepts only minor-version allowed changes. For more information, see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

occupant’s picture

In case anyone is interested, I've taken the plunge and adapted the plugin mentioned by @joelpittet in #10 and created it as a standalone project for now.

alexgreyhead’s picture

Thank you @Occupant - that module is perfect for our needs.

A

ostry.sn’s picture

wim leers’s picture

Status: Postponed » Needs review

I learned yesterday that https://www.drupal.org/project/ckeditor5_premium_features contains a free to use feature that addresses this:

Full screen mode
The full screen mode is a free-to-use plugin that maximizes the editing area. It is especially useful when using features like Document outline or Comments which take up extra space around the editor.

(It was actually announced by @witeksocha 2 weeks ago at https://github.com/ckeditor/ckeditor5/issues/1235#issuecomment-1783119311.)

See https://git.drupalcode.org/project/ckeditor5_premium_features/-/blob/1.2...

What do people think?

smustgrave’s picture

Status: Needs review » Reviewed & tested by the community
StatusFileSize
new182.99 KB

Tested the module and seems to be working

test

jwilson3’s picture

> What do people think?

How hard would it be to extract the fullscreen feature into core, so as not to confuse end user admins who are not interested in premium features. Would a Drupal maintainer then need to maintain the plugin JS ourselves as a fork?

Also, I'm curious if the fullscreen plugin from https://www.drupal.org/project/ckeditor5_fullscreen conflicts with https://www.drupal.org/project/ckeditor5_premium_features

wim leers’s picture

Status: Reviewed & tested by the community » Needs review

@smustgrave What does "RTBC" mean here to you? That we don't need to fix it in core?

Un-RTBC'ing because there's no patch nor MR to commit.

nessthehero’s picture

+1 to #24. If the plugin is free to use, it should be separated from the rest of the "pay to use" plugins, as it is confusing to be required to pay for all except one of the included plugins under a nomenclature of "premium".

I've tried out the fullscreen feature on a local site and it's pretty much exactly what our users want, so it would be nice if it was standalone.

smustgrave’s picture

What’s there to fix in core?

And agree with the last few comments. I don’t want the paid module for one feature. And is there agreement that wouldn’t become paid later?

jwilson3’s picture

I almost missed comment #20. We have https://www.drupal.org/project/ckeditor5_fullscreen contrib module that works without the “premium” module getting in the way. Of course the premium module is supported by the core CKE team, however, seems like it may be more resilient to go with a standalone module which depends on a cke5 contrib plugin that has been around since 2020. Then, at a future date when CKE core has implemented this feature, and Drupal core updates to that version, contrib module could be marked deprecated and have a max Drupal version constraint added to it, with migration instructions on the project page or something, so site builders know how to migrate away from it safely (yay for knocking down tech debt!) The same process could not be said for the premium module which might silently remove the fullscreen once added upstream, and site builders are left with a useless module on their site that no one remembers why it was added.

If anything, the issue status here seems like it could be either "active" or "postponed" (given we have a contrib solution and no ETA on upstream inclusion), and then would automatically go to "closed (outdated)" or "fixed" once we update to said CKE version in core.

smustgrave’s picture

Status: Needs review » Postponed

Agree this could be closed out once upstream is updated and we update core.

wim leers’s picture

Status: Postponed » Active

My understanding is that they will not be adding this to "CKEditor 5 core", because there are reasons for why they cannot make this feature work universally. I didn't dig in deep, but my high-level understanding is that every "integrator" of CKEditor 5 would have to build their own full screen mode, it just happens to be that they wrote one for us and are shipping it in that "Premium Features" module.

So, I don't think Postponed makes sense in that case. Unless/until we can convince them to eventually add it to "CKEditor 5 core".

witeksocha’s picture

We will not be adding it now but it's still in our plans to provide this feature in the core.

Creating a module for Drupal was just faster and easier for us, as we didn't need to think about all corner cases and editor types.

andrew.wang’s picture

FWIW, full screen mode is already provided in the official CKEditor 5 Plugin Pack as a “premium plugins available for free”: https://www.drupal.org/project/ckeditor5_plugin_pack

somdeb dasgupta’s picture

I would vote for having the full screen feature inside CKEditor 5 core. Any idea, tentatively when this feature will be incorporated in CKEditor 5 core?

dieterholvoet’s picture

CKEditor 45.0.0 has been released with support for full screen mode: https://github.com/ckeditor/ckeditor5/releases/tag/v45.0.0
I opened #3517711: Update CKEditor 5 to 45.0.0 to update CKEditor in core.

el7cosmos made their first commit to this issue’s fork.

el7cosmos’s picture

Title: [upstream] Support full-screen editing - distraction free mode when it is available upstream » Support full-screen editing - distraction free mode
Issue tags: -Needs upstream feature
el7cosmos’s picture

Status: Active » Needs review
xjm’s picture

Fixing attribution.

smustgrave’s picture

Status: Needs review » Needs work

IS seems incomplete

But question why do we need this when https://www.drupal.org/project/ckeditor5_plugin_pack offers fullscreen?

kobusvw’s picture

Hi @smustgrave,

In the latest Drupal releases (10.5.2 and 11.2.2) using CKEditor5 v45.2.0, the Fullscreen feature is intended to be part of core. While the button is referenced and the related functionality appears to be present in the codebase, the actual CKEditor 5 plugin code required to enable Fullscreen is missing.

The following merge request addresses this issue by properly including the plugin implementation in core:
🔗 merge request !12406

Once this is merged, the Fullscreen button will become available in the CKEditor 5 Toolbar configuration interface as expected.

Hope it will be included in the next release.

kobusvw’s picture

Status: Needs work » Needs review
smustgrave’s picture

smustgrave’s picture

Tagging for approval but this MR isn’t ready to be merged yet. Missing test coverage

begun’s picture

Anxiously awaiting this one to make it into core. It will make our authoring team very happy

smustgrave’s picture

bnjmnm’s picture

CK5 maintainer here. If this feature is now offered as part of CKEditor5 release in core, then it seems reasonable for core to include the plugin config that would make it available.

smustgrave’s picture

Status: Needs review » Needs work
Issue tags: -Needs product manager review, -Needs subsystem maintainer review

Versions do need to be updated with latest core version. Also would be good to complete the issue summary, especially UI change section.

mark_fullmer’s picture

Title: Support full-screen editing - distraction free mode » Support full-screen editing in CKEditor
Issue summary: View changes
Status: Needs work » Needs review

Version numbers updated to match Drupal 11.x, per #3555560: Update CKEditor 5 to 47.1.0. I've also updated the issue summary.

godotislate’s picture

Latest is actually on 47.3.0 after #3561212: Update CKEditor 5 to 47.3.0. Looks like the MR has the correct version though.

smustgrave’s picture

Status: Needs review » Reviewed & tested by the community

Let’s see if this lands before the next update

godotislate’s picture

Pulled this down locally and took it for a spin.

  • Installed standard profile
  • Edited the Full HTML text format, see the new Fullscreen icon in "Available buttons" Edit screen for full HTML text format
  • Added Fullscreen to Active toolbar and saved format
  • Went to create new Basic page, and set body format to Full HTML Create basic page body CKEditor with Full HTML format
  • Clicked Fullscreen icon Editor in fullscreen mode

Nice!

smustgrave’s picture

May be worth putting a ticket into the ckeditor_plugin_pack since this module already exists there

catch’s picture

Tagging for release highlights and yes we should open an issue against plugin pack once this is in (although they'll likely want to keep their own version of the plugin until 11.4 is the lowest supported version).

Version: 11.x-dev » main

Drupal core is now using the main branch as the primary development branch. New developments and disruptive changes should now be targeted to the main branch.

Read more in the announcement.

needs-review-queue-bot’s picture

Status: Reviewed & tested by the community » Needs work
StatusFileSize
new1.51 KB

The Needs Review Queue Bot tested this issue. It fails the Drupal core commit checks. Therefore, this issue status is now "Needs work".

This does not mean that the patch necessarily needs to be re-rolled or the MR rebased. Read the Issue Summary, the issue tags and the latest discussion here to determine what needs to be done.

Consult the Drupal Contributor Guide to find step-by-step guides for working with issues.

godotislate’s picture

Status: Needs work » Reviewed & tested by the community
Issue tags: +no-needs-review-bot

Back to RTBC.

rkoller’s picture

Issue tags: +wcag133
StatusFileSize
new80.22 KB

There might be two potential problems in the context of the MR. First, the hotkey ckeditor provides for invoking the full screen functionality (cmd shift f or ctrl shift f) isn't available/directly visible to the user in context. at the moment the user has to consult the ckeditor docs https://ckeditor.com/docs/ckeditor5/latest/features/fullscreen.html?docI...). one solution might be to simply add the hotkey to the tooltip like for the link, bold, or italic button. the only downside those hotkeys in the tooltip are unavailable in the aural interface. so the information would be only available for sighted users.
and second, on widescreen monitors there is a visual gap between the menu and toolbar block and the actual textarea. the former is aligned to the left while the textarea is centered.

a ckeditor 5 field in full screen mode on a widescreen monitor

for people using zoom solutions, who are only seeing a small fraction of the screen at once, this is quite the challenging barrier. you are able to to simulate the effect with the straw test. scott vinkle outlines the problem space in the following article: https://scottvinkle.com/blogs/work/proximity-and-zoom

a potential solution to the problem might be to either left align the textarea or center the menu and toolbar block aligned to the left border of the centered textarea.

*discussed the problem with @drupa11y on slack

longwave’s picture

@rkoller aren't all those problems things that should be addressed upstream by CKEditor? We don't do anything different here compared to the other plugins, so it feels like this isn't for Drupal to solve.

rkoller’s picture

uhhhh you are right. should have checked https://ckeditor.com/ckeditor-5/demo/feature-rich/ before. will open issues over in the ckeditor queue upstream on github.

longwave’s picture

Version: main » 11.x-dev
Status: Reviewed & tested by the community » Fixed

@rkoller thanks for the fast confirmation - was hoping you would agree so we don't hold this up any longer!

Committed and pushed da9a867bd85 to main and b08e26578b3 to 11.x. Thanks!

Can someone open the followup against the plugin pack module?

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

  • longwave committed b08e2657 on 11.x
    feat: #3331158 Support full-screen editing in CKEditor
    
    By: nchase
    By:...

  • longwave committed da9a867b on main
    feat: #3331158 Support full-screen editing in CKEditor
    
    By: nchase
    By:...
rkoller’s picture

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

acbramley’s picture

Just a note for anyone using this, using entity embed buttons in fullscreen mode the embed modals appear behind the fullscreen. You need to close fullscreen to interact with them. Haven't tested media library.