Add Support for CKEditor5

Created on 20 March 2023, over 1 year ago
Updated 29 May 2023, about 1 year ago

Problem/Motivation

This doesn't seem to be working for me with CKEditor 5, and it appears like it may have only been written with CKEditor 4 in mind (it reports a dependency on CKEditor 4 but not 5)

Steps to reproduce

  1. I have CKEditor 5 enabled for my text editor.
  2. I have several different media types defined such as document, image, and video.
  3. I have enabled this module and configured each media type with different allowed view modes.
  4. For example, image has a default view mode of "full", but "medium" and "narrow" are also allowed view modes.
  5. When I embed an image, it correctly defaults to "full", but it allows me to choose embedded, full, medium, and narrow. Embedded should only be allowed for my document media type. (Adding or removing allowed view modes does not seem to alter what view modes are presented to the user when embedding an image.)

Proposed resolution

Functionality should work with CKEditor 5 text formats.

Remaining tasks

User interface changes

API changes

Data model changes

✨ Feature request
Status

Active

Version

1.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States RichardDavies Portland, Oregon

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @RichardDavies
  • πŸ‡ΊπŸ‡ΈUnited States Chris Burge

    This module doesn't yet have support for CKEditor5. MRs are welcome, though!

  • πŸ‡ΊπŸ‡ΈUnited States RichardDavies Portland, Oregon

    I just found another issue:

    1. Before enabling this module, start with the CKEditor 5 media plugin setting "Allow the user to override the default view mode" checkbox unchecked. This way you should not have configured any allowed view modes here yet
    2. Enable this module
    3. Now check the box to "Allow the user to override the default view mode"
    4. Configure your allowed view modes per media type
    5. Click save and note the following error message

    The CKEditor 5 "Media" plugin's "Allow the user to override the default view mode" setting should be in sync with the "Embed media" filter's "View modes selectable in the "Edit media" dialog" setting: when checked, two or more view modes must be allowed by the filter.

    It's checking the original config to make sure at least two view modes were selected, but that config has been replaced with per media type config by this module so the validation needs to check the new config settings now.

  • πŸ‡¬πŸ‡ͺGeorgia almador

    Also received the message RichardDavies stated.

    How this should be properly solved?

Production build 0.69.0 2024