CKEditor 5 support?

Created on 15 February 2023, almost 2 years ago
Updated 17 July 2024, 4 months ago

This should be next on the todo list IMHO.

https://www.npmjs.com/search?q=ckeditor5

Feature request
Status

Fixed

Version

2.0

Component

Code

Created by

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

Comments & Activities

  • Issue created by @romulasry
  • Hello!

    I have implemented CKEditor 5 support. My fork of the repo is also here:
    https://github.com/hyrsky/ckeditor_media_embed

    It uses this:
    https://ckeditor.com/docs/ckeditor5/latest/features/media-embed.html#demo

    I made a short demo video (Twitter embed looks weird on the demo because my adblocker blocked the twitter widget script). The api key shown on the video is no longer valid 😅.
    https://streamable.com/6ewg5j

    This does does need some cleanup still. I have only commented out all the code related to the AssetManager. I don't really understand how something similar could be supported with CKEditor 5. My solution would be to remove it entirely and just use the webpacked assets like in the current patch. I can post another patch later that removes the AssetManager if there is no better solutions.

    Would the maintainers be willing to accept contribution like this to the module? I think it would have to be a new major version. Only the 'Semantic Media Embed' approach is supported.

  • @oikeuttaelaimille opened merge request.
  • Status changed to Needs review over 1 year ago
  • I figured out that NPM registry contains the compiled js that can be used!

  • First commit to issue fork.
  • @aleix opened merge request.
  • 🇪🇸Spain aleix

    I have created a new MR on top of oikeuttaelaimille MR .
    I think that while D10 support plan of this module is not more clear, this issue will reflect better this modules D10 support than the issue https://www.drupal.org/project/ckeditor_media_embed/issues/3286502 📌 Automated Drupal 10 compatibility fixes Fixed . As the efforts of d10 module with deprecated Ckeditor 4 support is something a little bizarre.

    So I think that this MR will be a good start for a new D10 branch with a functional ckeditor5 plugin from the beginning. So please, maintainers, could you start a new d10 branch after reviewing it? At least a new dev branch...

  • 🇺🇸United States ElusiveMind Nashville, TN

    Greetings everyone. I am going to be working as a new maintainer for this module on behalf Zivtech. I'll be setting up the dev 2.0 branch and be taking contributions toward the Drupal 10/CKeditor 5 version. I will also see about updating the existing release to support Drupal 10 and CKEditor 4 for legacy purposes.

  • 🇪🇸Spain aleix

    Writing just to give you my kudos for your maintainer efforts. So, after reorganization, could the affected issues be closed?

  • 🇺🇸United States phillamb168

    @elusivemind thank you for this. One issue I'm experiencing: on Pantheon, we're not allowed to run drush commands that modify libraries because the filesystem is read-only. I thus need to have the media-embed part of ckeditor5 installed via composer. I'm digging into the docs for the ckeditor5 core side of things, but do you have any leads on how to install the requirement without having to run the drush command?

  • 🇺🇸United States phillamb168

    I figured this out - it's actually pretty easy. On your local machine, run the drush command. Then what I did was:

    create a new directory in the project root `ckeditor-plugins`
    copy the `ckeditor5` directory from `web/libraries` (or wherever your docroot is) to this folder.
    Your directory structure should now look like this:
    /composer.json
    /composer.lock
    /web/libraries/ckeditor5/plugins/media-embed/build/media-embed.js (there are a lot of other files in /web/libraries/ckeditor5 but that's the important one)
    /ckeditor-plugins/ckeditor5/plugins/media-embed/ (again lots of other files here)

    You'll want to get composer to handle the copy of course - I added the following to my composer.json file:

        "scripts": {
            "post-update-cmd": [
                "cp -R ckeditor-plugins/ckeditor5 web/libraries/ckeditor5"
            ],  
            "post-install-cmd": [
                "cp -R ckeditor-plugins/ckeditor5 web/libraries/ckeditor5"
            ]
        }, 
    

    Your 'scripts' section may look slightly different - just add those two cp commands as necessary.

  • Status changed to Postponed: needs info 12 months ago
  • 🇺🇸United States ElusiveMind Nashville, TN

    This is tricky. Pantheon, while it does do composer install as part of its packaging and updating does not necessarily require it. I am torn between keeping this as-is and documenting that the plugins should be installed/updated locally and then pushed up via GIT.

    I welcome thoughts.

  • 🇺🇦Ukraine pingwin4eg Zaporizhia 🇺🇦

    Hi all. Will this issue be further worked on? I mean the CKEditor support. Should I apply the patch or one of merge requests?

  • 🇪🇪Estonia hkirsman

    I installed the https://github.com/hyrsky/ckeditor_media_embed and CKEditor part seems to work fine.

    On the public side though I don't see anything:

    What could be the reason?

  • Status changed to Fixed 6 months ago
  • 🇺🇸United States ElusiveMind Nashville, TN
  • Automatically closed - issue fixed for 2 weeks with no activity.

  • 🇪🇪Estonia hkirsman

    I'm not sure why was this issue marked as fixed?

Production build 0.71.5 2024