When you initialize the tinyMCE editor, I noticed two different ways to get a call when creating the editor.
One way is to use the installation callback, which is part of tinyMCE.init :
tinyMCE.init({
...
setup : function(ed) {
}
});
Another way is to hook into the onAddEditor event :
tinyMCE.onAddEditor.add(function(mgr,ed) {
});
What is the difference between using these two methods?
Is the editor in a different state in one and the other? For example, things are not loaded yet if I try to access the properties of an editor object.
What are the reasons for using one over the other?
source
share