CKEditor Media Embed with multiples instances

To embed videos from YouTube, Vimeo, etc. .., there is a plugin called MediaEmbeb which performs its tasks perfectly.

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.

  1. Look for the plugin folder in «.. / CKEditor / plugins / mediaembed /»
  2. In that folder locate and open the file «plugin.js»
  3. Locate the line:
    CKEDITOR.dialog.add( 'MediaEmbedDialog', function ()
  4. And replace it:
    CKEDITOR.dialog.add( 'MediaEmbedDialog', function (editor)

With this simple change everything will work correctly.

Un comentario en «CKEditor Media Embed with multiples instances»

  1. You’re so awesome! I don’t suppose I’ve read anything like that before. So nice to discover another person with some original thoughts on this topic. Really.. thank you for starting this up. This site is one thing that is required on the web, someone with a bit of originality!

Deja una respuesta

Tu dirección de correo electrónico no será publicada. Los campos obligatorios están marcados con *

Este sitio usa Akismet para reducir el spam. Aprende cómo se procesan los datos de tus comentarios.