+1-888-365-2779
Try Now
More in this section

Forums / Bugs & Issues / Safari or Firefox with RadEditor

Safari or Firefox with RadEditor

2 posts, 0 answered
  1. Kameo
    Kameo avatar
    13 posts
    Registered:
    23 Feb 2006
    26 Sep 2009
    Link to this post

    I set up the generic content module to allow admins to paste javascript into the html portion of the RadEditor.  Namely they wanted to be able to add Youtube strips to their pages.  after pasting all the javascript provided by google the videos did not display.  When we went back in to look at the html half of the script had disappeared.  (Some of it remained so I know the ability to paste script is working but some of it is getting cut out).

    To test what was happening I pasted a simple script into a generic content control:

    <script language="javascript">  
    document.write("hi");  
    </script> 

    I saved it then went back in to edit it and this was what had been saved

    <script language="javascript">     
    document.write("hi");     
    </script>   
    hihi 

    the "hi" was appended at the end twice even though I didn't put it in there.  it looks like something in radeditor is actually executing the javascript before it's saved.  I believe this is what causes 3rd party snippets to get messed up.  Has anyone else discovered this and is there a workaround?  Pasting the youtube strip stuff works in IE 8 but does not work in firefox or safari.  Unfortunately the client is a mac user.
  2. Katia
    Katia avatar
    194 posts
    Registered:
    01 Jul 2016
    30 Sep 2009
    Link to this post
    Hi Kameo,

    Try to enable EncodeScripts filter like shown below. That should do the trick.

    <telerik:RadEditor  
                        runat="server"  
                        ID="Editor"  
                        ContentAreaCssFile="~/Sitefinity/Admin/Themes/Default/AjaxControlsSkins/Sitefinity/EditorContentArea.css" 
                        ToolsFile="~/Sitefinity/Admin/ControlTemplates/EditorToolsFile.xml"                     
                        Skin="WebBlue" 
                        NewLineBr="False"  
                        DialogsCssFile ="~/Sitefinity/Admin/Themes/Default/AjaxControlsSkins/Sitefinity/EditorDialogs.css" 
                        Width="95%" 
                        ContentFilters="EncodeScripts,FixUlBoldItalic,FixEnclosingP,IECleanAnchors,MozEmStrong,ConvertFontToSpan,ConvertToXhtml,IndentHTMLContent">  
                        <ImageManager ViewPaths="~/Images" UploadPaths="~/Images" DeletePaths="~/Images" /> 
                        <MediaManager ViewPaths="~/Files" UploadPaths="~/Files" DeletePaths="~/Files" /> 
                        <FlashManager ViewPaths="~/Files" UploadPaths="~/Files" DeletePaths="~/Files" /> 
                        <DocumentManager ViewPaths="~/Files" UploadPaths="~/Files" DeletePaths="~/Files" /> 
                        <CssFiles> 
                            <telerik:EditorCssFile Value="~/Sitefinity/Admin/Themes/Default/AjaxControlsSkins/Sitefinity/EditorCssFile.css" /> 
                        </CssFiles> 
     
                    </telerik:RadEditor> 

    Let us know if you need further help.

    Sincerely yours,
    Katia
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
2 posts, 0 answered