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

[Solved] Disabling Embedded Resources - Reference resources via external CDN

1 Answer 220 Views
Editor
This is a migrated thread and some comments may be shown as answers.
Ricardo
Top achievements
Rank 1
Ricardo asked on 03 Sep 2009, 08:06 PM

I'm attempting to upgrade to the newest version of the RADEditor and load external resources via an external CDN in an effort to maximize load time for this control. 

However, I'm having trouble getting the control to render properly when I've disabled the use of embedded resources and instead referencing the javascript and image files on an external CDN.   

Here's what I've done:

Issue #1:

- I first attempted to reference just the js files externally by adding the following to our mark-up.

 <asp:ScriptManager ID="ScriptManager1" runat="server" >
      <Scripts>
        <asp:ScriptReference Path="http://img.icbdr.com/images/RadEditor/Scripts/Common/Core.js" />
        <asp:ScriptReference Path="http://img.icbdr.com/images/RadEditor/Scripts/Common/PopUpScripts.js" />          
        <asp:ScriptReference Path="http://img.icbdr.com/images/RadEditor/Scripts/Common/RadEditor.js" />
        <asp:ScriptReference Path="http://img.icbdr.com/images/RadEditor/Scripts/Common/DialogOpener.js" />
        <asp:ScriptReference Path="http://img.icbdr.com/images/RadEditor/Scripts/Common/Modules.js" />         
        <asp:ScriptReference Path="http://img.icbdr.com/images/RadEditor/Scripts/Common/SpellCheckService.js" />
        <asp:ScriptReference Path="http://img.icbdr.com/images/RadEditor/Scripts/Common/AjaxSpellCheck.js" />
        <asp:ScriptReference Path="http://img.icbdr.com/images/RadEditor/Scripts/Common/RadWindow.js" />
      </Scripts>
</asp:ScriptManager>

<MX:MXRadEditorV2 ID="mxRadEditorV2"
                  EnableEmbeddedScripts="false"
                  StripFormattingOnPaste="None"
                  NewLineBr="True"
                  StripAbsoluteImagesPaths="false"
                  ShowPreviewMode="True"
                  runat="server" >
</MX:MXRadEditorV2>

- See "ScreenShot: 2" (in attached Word document).   As you can see when I attempted to just reference the javascript files externally, the control renders fine, but I'm unable to click in the text area.  It behaves like it's disabled.  

Issue #2:

- I next tried to reference the images externally.

- I copied all the "Outlook" themed images to our Akamai server.
- I copied the following css files into our solution:

  •   Window.css
  •   Editor.css
  •   Editor.Outlook.css
  •   Window.Outlook.css
  •   EditorContentArea.css


- I'm now loading these styles in the code-behind of my generic test page that i'm attempting to render this control on.  See "Screen Shot: 1" in the attached Word document that will show that all the style sheets are loaded.

- I updated both Editor.Outlook.css and Window.Outlook.css to reference all the .gif files via our Akamai servers.  I've attached the two css files that I updated so you can confirm that I updated the paths correctly.

- I also added the following properties (bolded) in an attempt to fully disable the use of embedded resources.

<MX:MXRadEditorV2 ID="mxRadEditorV2"
                  EnableEmbeddedScripts="false"
                  EnableAjaxSkinRendering="false"
                  EnableEmbeddedBaseStylesheet="false"
                  EnableEmbeddedSkins ="false"
                  Skin = "Outlook"

                  StripFormattingOnPaste="None"
                  NewLineBr="True"
                  StripAbsoluteImagesPaths="false"
                  ShowPreviewMode="True"
                  runat="server" >
</MX:MXRadEditorV2>

- This resulted in "ScreenShot: 3" (in attached Word document). 

- I then attempted to set EnableEmbeddedBaseStylesheet = "true".

- This resulted in "ScreenShot: 4" (in attached Word document).   Notice that a couple of images/icons are showing up at the bottom of the page, but the rest of the page is not rendering any images.

I've dug into the online documentation and perhaps I've just overlooked something, but I'm completely stuck.  Any assistance you can provide would be appreciated.

Thank you,

Brian Kamer
CareerBuilder.com




1 Answer, 1 is accepted

Sort by
0
Lini
Telerik team
answered on 04 Sep 2009, 10:05 AM
Hi Brian,

I have already answered your support ticket on this issue and I will paste the answer here for reference - you need to make sure that the skins and scripts you use are from the same RadControls release as the Telerik.Web.UI assembly reference in your web application. In your case you have older skins/scripts which is why the editor does not work when you disable the embedded resources. Also, to use external skins with the editor, you need to add the DialogsCssFile property as shown in the following KB article - http://www.telerik.com/support/kb/aspnet-ajax/editor/register-external-skin-vista-radeditor.aspx

Greetings,
Lini
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.
Tags
Editor
Asked by
Ricardo
Top achievements
Rank 1
Answers by
Lini
Telerik team
Share this question
or