Closed (fixed)
Project:
CKEditor Media Embed Plugin
Version:
2.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
15 Feb 2023 at 00:52 UTC
Updated:
17 Jul 2024 at 06:29 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
huhhuh commentedHello!
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.
Comment #4
huhhuh commentedI figured out that NPM registry contains the compiled js that can be used!
Comment #7
aleixI 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...
Comment #8
elusivemind commentedGreetings 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.
Comment #11
aleixWriting just to give you my kudos for your maintainer efforts. So, after reorganization, could the affected issues be closed?
Comment #12
phillamb168 commented@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?
Comment #13
phillamb168 commentedI 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:
Your 'scripts' section may look slightly different - just add those two cp commands as necessary.
Comment #14
wim leersUpdated https://www.drupal.org/docs/core-modules-and-themes/core-modules/ckedito... for this 😊
Comment #15
elusivemind commentedThis 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.
Comment #16
pingwin4egHi all. Will this issue be further worked on? I mean the CKEditor support. Should I apply the patch or one of merge requests?
Comment #17
hkirsman commentedI 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?
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.
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.
Comment #18
hkirsman commentedComment #19
elusivemind commentedComment #21
hkirsman commentedI'm not sure why was this issue marked as fixed?