you're right
At that point it works fine.
But this means if i have a javascipt like this i must change to HTML, repair my scipt, and submit in HTML without going back to normal.
when a user edits a text with javascript he should completely do this in WYSIWYG mode. he should nog care about javascripts
and even if he does care he don't want it to be distroyd everytime he watches in normal mode.