开发者

Tinymce and j is null using tinyMCE.execCommand('mceRemoveControl', false, "textarea_id");

I am using TinyMCE on my website, and keep running into the error:

j is null

I am loading a file via ajax, which contains a textarea. I then perform:

tinyMCE.execCommand('mceAddControl', false, 'id');

Before I call TinyMCE again, I use:

tinyMCE.execCommand('mceRemoveControl', false, 'id');

However, this results in the j is null error.

I have broken down tinymce.js into lines, and j is within the class selection. More specifically, inside the getRng function, as documented here:

http://tinymce.moxiecode.com/js/tinymce开发者_开发百科/docs/api/index.html#class_tinymce.dom.Selection.html

My guess is that there is still something in the browser memory stack after the control is removed? Either way, I could really use a solution to the problem.


If the problem occurs sporadically, perhaps you are not listening to TinyMCE events like oninit, etc. to ensure that it's ready when you are performing actions on it.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜