Reputation: 209
I have 2 ckeditors in the same container (a div) like below (textarea will be replaced by my js code with ckeditor):
<div id="container">
<textarea id="cke0"></textarea>
<textarea id="cke1"></textarea>
</div>
It's works great, but I have an issue when I let the container div be sortable (with jquery ui sortable) like :
$("#container").sortable();
I lost the content of the editor and the editor is no more editable and accessible. I can't focus the editor. I check in the debugger and the editor (the iframe) is still present in the DOM.
Anyone had this issue ?
thanks for replies Bastien
Upvotes: 4
Views: 1810
Reputation: 246
I used extra plugin 'divarea' (it replaces iframe by div) and 'cancel' options in sortable.
Something like this:
CKEDITOR.replace('cke0',{extraPlugins: 'divarea'});
$('#container').sortable({items: 'textarea',cancel: '.cke_inner'});
Upvotes: 4
Reputation: 21
I'm having pretty much the exact same issue. I found this link which is basically the same thing (I believe).
How to prevent an iframe from reloading when moving it in the DOM
Upvotes: 1