j is null exception while tinyMCE editor is added to the page as a widget
I have a page where we can add any number of widgets containing tinyMCE editor. When I add the first widget the editor works fine. If I try to add a second widget or more the editor of the second widget shows 'j is null' error. The widgets and textareas have unique ids in all the cases.
The widgets containing the editor is added using jQuery drag and drop method.
The application is created in asp.net mvc 3
I used functions for initializing the tinyMCE as
tinyMCE.execCommand('mceAddControl', false, textareas_id);
and for destroying the tinyMCE as
tinyMCE.execCommand('mceFocus', false, textareas_id);
开发者_运维百科 tinyMCE.execCommand('mceRemoveControl', false, textareas_id);
I need the editors of all the widgets to work fine
Make sure all tinymce editors have different ids.
You may weant to check this SO-question regarding the "j is null" error.
精彩评论