I want to manipulate a CKEDITOR instance once it is well and truly loaded, meaning I've fetched a series of things and inserted them with setData.
The problem is, I call a function once I'm done doing setData that manipulates the DOM of the loaded data, and it does nothing, because apparently the data hasn't actually been loaded and displayed or... whatever it is that CKEDITOR does with it exactly. If I do a setTimeout(...., 3000) or therea开发者_StackOverflow社区bouts, it does work. Of course, that is an Ugly Hack because the number is just a random guess. I want some kind of event that I can latch on to, that lets me know that it's ok to dive into the editor's contents and start fiddling with them.
I've tried on 'loaded', on 'instanceReady' and various other callbacks without a great deal of success.
It looks as though 'contentDOM' may be the winner:
editor.on('contentDom', function(e) {
set_up_style_stuff();
});
精彩评论