This is a migrated thread and some comments may be shown as answers.

RadEditor and client scripts problem

1 Answer 83 Views
Editor
This is a migrated thread and some comments may be shown as answers.
cisatlantic
Top achievements
Rank 1
cisatlantic asked on 10 Sep 2008, 10:38 AM
Hello,

When I write/paste a javascript code into the RadEditor, it ignores it when I switch to another view and when the page is posted. Do you know how to fix this problem ?

Here is a sample code I write/paste into the Editor:

<script type='text/javascript'>
alert('test');
</script>

1 Answer, 1 is accepted

Sort by
0
Rumen
Telerik team
answered on 10 Sep 2008, 02:13 PM
Hi,

RadEditor strips by default all SCRIPT tags in its content area to reduce the possibility of cross-site scripting and other script-related problems. To disable the script tag stripping filter set the code below in your codebehind:

RadEditor1.DisableFilter(EditorFilters.RemoveScripts);


This should do the trick.

Best regards,
Rumen
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Tags
Editor
Asked by
cisatlantic
Top achievements
Rank 1
Answers by
Rumen
Telerik team
Share this question
or