How do I find out if CKEditor is loaded? I\'ve looked through the API docs, but could only find the loaded event. I want to check if CKEditor is loaded, because if I load it a s
I've looked through the API docs, but could only find the loaded event.
I don't know whether there exists a specific property for this - there might! - but you could use the loaded event to set a global flag. It's not really nice but would do the job.
// At the top of the script
CKEDitor_loaded = false;
// then later
CKEDITOR.on('loaded', function(){ CKEditor_loaded = true; });
Instead of a global variable, you could also consider setting something inside CKEDITOR
:
CKEDITOR.flag_loaded = true;
This would be a bit cleaner.