Hello, do you now if is possible to user "createFakeElement" api and FakeElement plugin to embed a javascript gallery code?
I have my piece of HTML that generate the gallery. I want to create a button that on submit add to the editor a FakeElement.
I'm not so skilled in js and I try to write this script but of course is not working.
function newGallery() { var editor = CKEDITOR.currentInstance; var value = document.getElementById( 'gallery' ).value; var realElement = CKEDITOR.dom.element.createFromHtml( value ); var fakeElement = editor.createFakeElement( realElement, 'cke_video', 'video', true ); editor.insertElement(fakeElement); }