TypeError: g.win.document is null
I found this thread in tinymce forums:
http://tinymce.moxiecode.com/punbb/viewtopic.php?id=11254
spocke says something about messed up editor instances?
Maybe it has something to do with replacing the editor via javascript
after saving it via ajax.
What is the best way to initialize an editor after adding it
dynamically?
I call TinymceHammer.init() after replacing the editor and this worked
great until I updated the tinymce to version 3.3.2
Some ideas?
For testing I removed the init function and the editor does not show
up (only the textarea as expected). After posting the form via ajax,
the error appears.
If I load the page via Browser refresh everything works fine. Just
after the TinymceHammer.init function call something breaks. Maybe
initializing the textareas dynamically was changed in tinymce 3.3.2?
I try to revert to older tinymce version for now. Maybe this helps.
I really depend on this, so any clues are very much appreciated!
I'll will try my old fork on github for this now. Maybe together we'll
find a way to fix this mayor issue!
THANKS!
I have to remove the editor instance before initializing it again
with:
tinyMCE.execCommand('mceRemoveControl',true,'the_id_of_the_textarea');
Found the solution here:
http://www.handgestrickt.biz/index.php?postid=74
Me Stupid :)
regards
thomas