CKEditor 5 can grow past the viewport when there is a lot of content

Created on 9 December 2022, about 2 years ago
Updated 1 February 2023, almost 2 years ago

Problem/Motivation

CKEditor 5 effectively ships with CKEditor 4's Autogrow plugin enabled by default (which Drupal also added in #2239419: Include CKEditor's AutoGrow plug-in ).

This means it suffers from the same usability consequences for long content: it can grow too tall!

We fixed that for CKEditor 4 in #2986147: Autogrow for non-admin users causes CKEditor grow past the viewport when there is a lot of content in the CKEditor .

We should do the same for CKEditor 5.

Steps to reproduce

Proposed resolution

Implement the solution that https://ckeditor.com/docs/ckeditor5/latest/installation/getting-started/... recommends:

Classic editor (CKEditor 5) no longer encapsulates the editing area in an <iframe>, which means that the height (and similar options) of the editing area can be easily controlled with CSS. For example, the minHeight and maxHeight settings can be achieved with the following code:

.ck.ck-content:not(.ck-comment__input *) {
/* Note: You can use min-height and max-height instead here. */
  height: 300px;
  overflow-y: auto;
}

… but combine this with JavaScript that computes the desired height, just like we did in #2986147: Autogrow for non-admin users causes CKEditor grow past the viewport when there is a lot of content in the CKEditor .

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

🐛 Bug report
Status

Closed: duplicate

Version

10.1

Component
CKEditor 5 

Last updated 1 day ago

Created by

🇧🇪Belgium wim leers Ghent 🇧🇪🇪🇺

Live updates comments and jobs are added and updated live.
  • Usability

    Makes Drupal easier to use. Preferred over UX, D7UX, etc.

  • CSS

    It involves the content or handling of Cascading Style Sheets.

  • Regression

    It restores functionality that was present in earlier versions.

Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024