nshenderov / strapi-plugin-ckeditor

Integrates CKEditor 5 into your Strapi project as a fully customizable custom field. (Unofficial integration)
https://www.npmjs.com/package/@_sh/strapi-plugin-ckeditor
MIT License
84 stars 53 forks source link

Local video upload #116

Closed kevinvugts closed 5 months ago

kevinvugts commented 11 months ago

Is your feature request related to a problem? Please describe. No, it's a feature request to be able to embed local uploaded video's with the plugin. Currently only Youtube, vimeo and such platforms are supported. But not Strapi uploaded videos.

Describe the solution you'd like An option to be able to support local uploaded embedded videos inside CKEditor 5

Describe alternatives you've considered

Additional context nope

pablost88 commented 7 months ago

I faced the same issue and ended up digging into the plugin code. The part of the code that handles the embed feature is located inside the file admin/src/components/Input/MediaLib/index.js

You need to edit the method handleChangeAssets. Inside this method you can add a new else if statement to check for the video mime type and add a video tag manually. You may also need to add the plugin CKEditor5.htmlSupport.GeneralHtmlSupport and configure it to allow <video> html tags