hvlads / django-ckeditor-5

Django CKEditor 5 integration.
Other
152 stars 60 forks source link

extraProviders for Youtube Shorts in Media Embed #244

Closed jisoooh0202 closed 2 months ago

jisoooh0202 commented 2 months ago

ckeditor5 has no regular expression for shorts for media embed. However, they allow other providers with extraProviders.

I was trying various way to add extraProviders in CKEDITOR_5_CONFIGS, but failed.

I asked on stackoverflow, but no one answered yet. https://stackoverflow.com/questions/78960825/django-ckeditor-5-media-embed-config-for-youtube-shorts

Have anyone done this? If so, please help.

goapunk commented 2 months ago

@jisoooh0202 I don't think it's currently possible as ckeditor expects the config to be valid javascript and not a string/python object. For now you'd have to fork this repository and add the providers directly in app.js. I assume we could improve the django config in the future to allow adding extraProviders.

jisoooh0202 commented 2 months ago

@goapunk Thanks for your response. Just want to let you guys know that it is now possible to embed the shorts. ckeditor5 team made it work with my issue. https://github.com/ckeditor/ckeditor5/commit/2b74a8aeb69e8e01823d6cb1d0fb752f1480ee4d

I hope you can update the CKEditor 5 version to 43.1.1 without much things to do.

Anyway, it would be still great to improve the django config in the future as you said. Thanks.