FYI regarding the RAD Telerik editor for DNN
Last Post 11/23/2010 11:29 AM by Bo. 1 Replies.
Author Messages
Bo
Nuke Master
Nuke Master
Posts:215


--
11/23/2010 11:12 AM  
Hello Lee, I watched you tutorials on the new Telerik RAD editor provider and all the different tweaks that could be done to it via the defaultconfig.xml file as well as the tools xml file. I wanted to just add another note to a tweak concerning this provider that I don't believe you touched on in the tutorial and that is how one might prevent the editor for stripping out script tags in the event that a javascript would need to be injected in a module using this rad plugin as its content provider for html within the module. I ran into this problem just yesterday in regards to the live tooltip module which utlized the rad editor to provide the engine to add rich content. I needed to reference a script that provided a dynamic content service that would rotate content on a daily basis provided by them but couldn't get this script to stick since the editor kept stripping it out. What I discovered was that the reason this is the case is because by default within your defaultconfig.xml file one of the configurations are as follows: (greater than sign)property name="ContentFilters"(less than sign)Defaultfilters (end the property tag) what I discovered was that this filter basically is a shortcut to implement all the possible filters possible to the RAD editor except the filter that turns relative URL's into absolute ones which of course is not necessarily what people intend when they create relative links. other than that all other filters are implemented in the rad editor one of them being a filter called REMOVE SCRIPTS. Obviously just by the nature of the name this filter strips away any script tags that you provide in your rad editor so even if you add script tags in the html view as since as you update or switch to design view these encapsulating script tags with its content is stripped out rendering this editor useless if needing to invoke a script inside a module that utlizes this tool for the purpose of adding rich content. So a work around I learned was from the following site: http://demos.telerik.com/aspnet-aja...ultcs.aspx In this site you get all the possible filters available to your disposal as well as the purpose of them or what they do within the editor. In my case since I wanted the ability to use script tags what I did was I basically deleted the defaultfilters within the content filters property and replaced it. If you are not going to use default filters do to its inclusion of the script removal filter what I did was just copy and paste the whole property content filter tag with all its contents and just edited the words within the open and close property tags to implement each filter I really wanted implemented in which case for me I added all the filters except the absoluteurl filter and the removescript filter. There was about 11 filters in all I needed to add in one filter per property tag with the name contentfilters. I suppose there has got to be a more robust way to do this than I discovered but I tried to add all the filters to the content filters property's in the one line using comma deliminated approach seperating each filter by a comma but that broke my rad editors ability to see or add content so realized I had to only put one filter per property tag and just duplicate the property contentfilters tag for each filter I wanted added. I am wondering if any of you know of a better way to go about this. (i.e. is it possible to somehow just delete the remove script filter from those included in the defaultfilters or perhaps is there another delimited way to string all these filters out instead of having to put each on in there one property tag. Anyway unless you guys have a more effiecient approach to this issue surrounding the rad editor in regards to its default behavior of stripping script tags if you wish to have the priveledge of adding scripts into modules such as html, live tooltip or any other module that allows the use of content editing via the htmleditor provider in which your provider is the rad editor the solution outlined in this thread will work if your default provider for content editing is still fckeditor or someother provider I can't help you much but this works well for the new telerik rad editor for DNN. Thanks for listening, Bo
Bo
Nuke Master
Nuke Master
Posts:215


--
11/23/2010 11:29 AM  
Hello There just wanted to add a reply to my discovery. Here is some of the letter I sent off to the makers of livetooltip and I am incorporating it within this forum as I feel it might be useful to anyone who is thinking of tweaking the rad configurations to allow script tags to be retained within the RAD Telerik editor.

--------------------------------------------------------------

After reading your reply I did my own research in regards to this rad editor issue and discovered that indeed it does of this short fall but that it can be rectified via the defaultconfig.xml file. If any of your other customers run into this special case scenarios and they a program savvy you might want to point them to the following url:

http://demos.telerik.com/aspnet-aja...ultcs.aspx (which describes each of the filters that can be implemented in the rad editor for asp.net ajax which is the DNN version of telerik editor.

Also the following website describes how one might disable these content filters such as the one I ran into called remove scripts:

http://www.telerik.com/support/kb/a...r-dnn.aspx

Both these sites will give the details of what to do. It doesn't seem like it gives you exactly the name of your configuration file or the right path where it is located but once you find it tells you how to deal with the information inside of it.

The path for this file is not as you probably know in desktopmodules folder but rather within

/Providers/HtmlEditorProviders/Telerik/Config and the file is called configdefault.xml not configfile.xml within the /DesktopModules\TelerikWebUI\RadEditorProvider\ as the kb article suggests its at.

Last but not least here is the initally page I went to and followed to bring you all this news

http://www.telerik.com/community/fo...cript.aspx

Hope these help anyone concerned with the fact their new htmlprovider for DNN tends to strip script tags whenever they are injected.


---