Ckeditor5: Allow to disable auto embed

Created on 5 Dec 2019  路  2Comments  路  Source: ckeditor/ckeditor5

I have been having 1 common issue with ckeditor. I can't configure a lot of stuff. This one seems like a no-brainer. I tried removePlugins: [ 'AutoMediaEmbed' ], but it never worked. You include this plugin as a dependency for another one which doesn't make sense either. Embedding doesn't require auto embeding to work (it didn't even exist at first). It shouldn't be forced in like that as a dependency. If anything the MediaEmbed is a dependency of AutoMediaEmbed.

But the simple solution without getting into if it should be a dependency or not is to just be able to do autoMediaEmbed: false?


If you'd like to see this feature implemented, add a 馃憤 reaction to this post.

question

All 2 comments

Hi! That's correct, AutoMediaEmbed plugin is required by default by the media embed plugin - https://github.com/ckeditor/ckeditor5-media-embed/blob/b8b4b929d2a6d8eaa9efaa568fa0bdbec7d76872/src/mediaembed.js#L36

However, as MediaEmbed plugin is a glue which connects all the required parts of the plugin, you can simply import those dependencies instead of MediaEmbed (or create a new plugin which will require dependencies without AutoMediaEmbed. So, use:

import MediaEmbedEditing from '@ckeditor/ckeditor5-media-embed/src/mediaembedediting';
import MediaEmbedUI from '@ckeditor/ckeditor5-media-embed/src/mediaembedui';
import Widget from '@ckeditor/ckeditor5-widget/src/widget';

instead of:

import MediaEmbed from '@ckeditor/ckeditor5-media-embed/src/mediaembed'

Really? This is your response? ...

Starting to get concerned about our choice of editor.

Was this page helpful?
0 / 5 - 0 ratings