Sorry to be annoying here within this forum.
I need help urgently with my problem of removing CKEditor instances.
I will pay 100 Euro to anyone who can fix the issue.
Problem:
1. I load content dynamically through into a div container.
2. Withing the loaded content theres a textarea with class 'cked'
3. Replace all textareas with class 'cked' with CKEDITOR's
4. Destroy editors properly ( which isnt working )
5. Load again the content and apply again CKeditors ( isnt working properly due instance already exists)
Testcase:
Site: http://www.adwintiser.com/testcase.html
Content being loaded: http://www.adwintiser.com/testsample.html
Code:
<html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <script src="/scripts/mootools_1_3.js" type="text/javascript"></script> <script src="/scripts/mootools_more_1_3.js" type="text/javascript"></script> <script src="/assets/scripts/ckeditor/ckeditor.js" type="text/javascript"></script> </head> <body> <script language="javascript"> window.addEvent('domready', function() { $('loader').addEvent('click',function(){ loadEdit(); }); $('loadagain').addEvent('click',function(){ CKEDITOR.instances['ROW[text]'].destroy(); CKEDITOR.remove('ROW[text]'); //loadEdit(); }); } ); function loadEdit(){ $('content').set('load',{onSuccess:function(){applyEditor();}}); $('content').load("testsample.html"); } function applyEditor(){ CKEDITOR.replaceAll('cked'); } </script> <div id="content" style="background:white;border:2px solid gray;">content will be loaded here</div> <a id="loader" style="border:2px solid red;">load content</a> <a id="loadagain" style="border:2px solid green;">remove ckeditor</a> </body> </html>
Re: 100€ - for solving Issue of removing/destroying instanc
if(CKEDITOR.instances['ROW[text]') { // destroy only if already have
CKEDITOR.instances['ROW[text]'].destroy();
}
loadEdit();
});
function loadEdit(){
$('content').set('load',{onSuccess:function(){
if(!CKEDITOR.instances['ROW[text]') {// create only if already not created
applyEditor();
}
}});
$('content').load("testsample.html");
}
Re: 100€ - for solving Issue of removing/destroying instanc
Re: 100€ - for solving Issue of removing/destroying instanc
Re: 100€ - for solving Issue of removing/destroying instanc
Not sure if this is what you are after or will help (I'm using Jquery) at all.
This is the content I load in (editload.htm)