CKEditor and null currentInstance
CKEditor and null currentInstance
I was working with a particular application that uses the CKEditor, and was getting a JS exception indicating a variable was null inside the formula editor when I tried to save the formula back to the editor.
It looks like the editor was doing this:
exec : function(editor, latex)
{
currentEdit=CKEDITOR.currentInstance;
When it might have been better to do this?
exec : function(editor, latex)
{
currentEdit = editor;
if (!currentEdit) {
currentEdit=CKEDITOR.currentInstance;
}
The editor is passed into the exec function, so there really shouldn't be a need get it it from the CKEDITOR I think? ...even if there is in some cases, might be better to use that only as a fail-safe?
Thanks for the great formula editor!
1 Sep 11, 1:18PM
Thanks for your suggestion - I'll implemented this shortly for testing.
My apologise for the long delay in replying - We've been on a summer break.
Will.
Login