Hi,
i'm using jquery to create editor instances, and am getting an error that says the editor already exists. the issue was mentioned in these threads:
viewtopic.php?f=11&t=15499
viewtopic.php?f=11&t=15470
but I can't really tell what the solution is, or why it's happening, as it's not like i'm trying to create an instance twice.
here's my code:
$(document).ready(function() {
$('.ckeditor').each(function()
{
CKEDITOR.replace(this,
{
toolbar : 'new',
filebrowserUploadUrl : '/tech/fileupload.html',
});
});
for (instance in CKEDITOR.instances)
{
var editor = CKEDITOR.instances[instance];
if (editor)
{
editor.on('focus', function(event)
{
if ($("#cke_top_" + event.editor.name + " .cke_toolbox").attr('style')=="display: none;")
{
event.editor.execCommand('toolbarCollapse'); //toggles
}
$("#cke_contents_" + event.editor.name).attr('style',"height: 125px;");
currentInstanceName = event.editor.name;
});
}
}
});
thanks!
Thu, 10/01/2009 - 00:42
#1
Re: javascript: instance already exists