WebTextEditor - Why is editor modifying my script?

3 replies. Last post: September 2, 2011 5:29 AM by Handy Surya
Tags :
  • New Discussion
  • New Question
  • New Product Feedback

Hello,

I have <a class="xxxxx" href="#" onclick="javascript:doSomething()"; return false">hello</a> in a webgrid cell, originating from sql server.  This script works as intended when exposed on the webpage.

But when this script is inserted in WebTextEditor, which is I have on the same page as the grid and which I use (in multiple sections format) to edit the content of the grid row, WebTextEditor turns the script into: <a class="xxxxx" onclick="function onclick() { function onclick() { function onclick() { doSomething(); return false; } } }" href="#">hello</a>.  During update, the script is returned to the grid and sql in this modified format, which now does not work.

In fact, an additional "function onclick() {}" is added around the original function each time you switch between Design and HTML views.  In other word, WebTextEditor adds 10 "function onclick() {}" around the original doSomething() if you switch 10 times between Design and HTML views, causing the function to stop working when saved back to the grid/database.  Why is this happening?

WebTexEditor seems to behave as described above with most of this type of scripts, at least in my settings.

Am I doing or not something here that invokes this behavior in the editor? if not, how do I ensure that things that I do not intentionally modify are returned the grid and server from WebEditor exactly as they came out ?

Regards

Jean

All times are GMT -5. The time now is 5:02 PM.
Previous Next