When used in my project I realized that if on the same page we have more of an HTML editor, going to embed a video in one of the first editors, it actually inserts the last of them.
I have been reviewing the code and the solution is very simple.
- Look for the plugin folder in «.. / CKEditor / plugins / mediaembed /»
- In that folder locate and open the file «plugin.js»
- Locate the line:
CKEDITOR.dialog.add( 'MediaEmbedDialog', function ()
- And replace it:
CKEDITOR.dialog.add( 'MediaEmbedDialog', function (editor)
With this simple change everything will work correctly.