Skip to content Skip to sidebar Skip to footer

Ckeditor Inline Editor On Elements Within An Iframe

In an application I have content editable elements within an iframe and want to apply inline CKEditor to those elements. It works except when I scroll the iframe the CKEditor toolb

Solution 1:

You can achieve this by wrapping the iframe with a container element that is the same size as the iframe and has relative positioning.

<divid="iframe-wrapper"><iframe><body><divcontenteditable></div></body></iframe></div>

Then you move the position of each ckeditor panel into that container element and the absolute positioning values will work.

var el = $('iframe').contents().find('[contenteditable]');
el.ckeditor();
el.ckeditorGet().on('instanceReady', function(){
    $('body > .cke_float').appendTo('#iframe-wrapper');
});

Post a Comment for "Ckeditor Inline Editor On Elements Within An Iframe"