This should be next on the todo list IMHO.

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

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

romulasry created an issue. See original summary.

huhhuh’s picture

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.

huhhuh’s picture

Status: Active » Needs review

I figured out that NPM registry contains the compiled js that can be used!

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

aleix’s picture

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 . 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...

elusivemind’s picture

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.

aleix’s picture

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

phillamb168’s picture

@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?

phillamb168’s picture

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.

wim leers’s picture

elusivemind’s picture

Status: Needs review » Postponed (maintainer needs more info)

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.

pingwin4eg’s picture

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

hkirsman’s picture

StatusFileSize
new203.49 KB

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:
oembed not working

What could be the reason?

edit: Needed to enable Convert Oembed tags to media embeds at /admin/config/content/formats/manage/full_html but now I'm getting new errors in the public side:
Unable to retrieve https://www.youtube.com/watch?v=D03dqZZpUe4 at this time, please check again later.
Unable to retrieve https://youtu.be/SGKH59InQ2Q at this time, please check again later.
Unable to retrieve https://youtu.be/1o48spMQB14 at this time, please check again later.

unable to retrieve

edit 2: I got it working but it's commercial API. Used instructions from here https://stackoverflow.com/questions/32740456/ckeditor-embed-getting-erro...

Are there alternatives? Does it cache the ombed hits? It seems it does, just wondering what's the magic? I would not want one page to hit the limit of 1000 free requests.

hkirsman’s picture

StatusFileSize
new40.48 KB
elusivemind’s picture

Status: Postponed (maintainer needs more info) » Fixed

Status: Fixed » Closed (fixed)

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

hkirsman’s picture

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