Thanks for your reply.
But the example is not like my application. In my previous post, I indicated it works fine when the editor just posts back to itself with being visible. But if you make the editor invisible (Editor.Visible=false) in a postback, then make it visible (Editor.Visible=true) in the next postback, all script elements will be stripped out.
Could you please modify your example to add 2 radio buttons: one called "Show Editor" and one called "Hide Editor". When you click the "Show Editor" to postback, set Editor.Visible=true. When you click "Hide Editor", set Editor.Visible=false.
When the editor is visible, you can insert some JS code like "<script>alert();</script>" into the content. Then click the "Hide Editor" to hide it. After you clicked the "Show Editor" to bring the editor back, you can see the JS code has been stripped out.