TinyMCE this.getDoc() problem solved.
We've been trying to integrate tinyMCE with out CMS Sophia here at Alcassoft.
One issue that keep on cropping up is this 1 javascript error that occurs when you create a instance of tiny, and fail to remove it before initializing it on the same element causing the "this.getDoc()" error.
Well i've solved the issue by checking for the existence of the tiny instance before adding the control.
var tmptiny = tinyMCE.getInstanceById(element.id);
if(tmptiny)//tiny instance exist
{
tinyMCE.removeInstance(tmptiny);
try//try to remove editor if exist
{
tinyMCE.execCommand('mceRemoveControl', false, element.id);
}
catch(e){}
}
tinyMCE.execCommand('mceAddControl', false, element.id);
I really didn't know about "removeInstance" method untile i looked into the code itself.

There are no comments for this entry.
[Add Comment]