I can't figure out how to initialize two instances of tinymce
on my page.
I've tried the answer from this question but no luck. Do I need to use a timeout if it takes some time to finish initializing the first one (io) before starting to initialize the second one (co)?
var io = {
selector:"#auth_info_intro textarea",
...,
setup:function(ed){
ed.on("init",function(e){
tinyMCE.activeEditor.setContent(obj.INFO.INTRO.TEXT);
});
}
};
var co = {
selector:"#auth_info_conclude textarea",
...,
setup:function(ed){
ed.on("init",function(e){
tinyMCE.activeEditor.setContent(obj.INFO.CONCLUDE.TEXT);
});
}
};
tinymce.init(io);
tinymce.init(co);
The above throws Uncaught TypeError: Cannot read property 'body' of undefined
.
What am I missing?