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.
精彩评论