Tuesday, April 26, 2011

Adding JavaScript into RichHtmlField on Publishing Sites

To try and prevent scripting attacks, the RichHtmlField will remove any JavaScript code out when saving/checking in/publishing a page, and sadly there's no option to make it allow script tags. To get around this, I've used two alternatives in the past:

1) Add a Content Editor Web Part to your page, which will not strip JavaScript
2) Use the Telerik RadEditor

Any other alternatives are welcome!

No comments: