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

WebResource.axd with RadEditor styles

3 Answers 105 Views
ScriptManager and StyleSheetManager
This is a migrated thread and some comments may be shown as answers.
John
Top achievements
Rank 1
John asked on 06 Aug 2013, 02:04 PM
I am noticing some strange behavior. We have a RadEditor and when the page loads it takes about a second or so and then there is a half second delay and then a WebResource.axd is loaded that contains some styles such as .RadEWrongWord{background-color:yellow}. I would like to not have this WebResource.axd created or loaded with this delay. Any thoughts?

3 Answers, 1 is accepted

Sort by
0
Marin Bratanov
Telerik team
answered on 09 Aug 2013, 07:14 AM
Hello John,

When the machine connection is a bit slow (i.e. it is not on localhost) some delay when the page resources are being loaded can and should be expected. Complex pages can need a few MB of data that needs to go through the internet connection and be parsed by the browser. How fast this happens depends on the speed of the connection, the performance of the browser and the overall power the computer has.

That being said, I can suggest a few things that can help you have this rule in the page sooner:
- use the skins CDN on that page. After the first hit to the page the resources will be cached by the browser and subsequent visits to the page will obtain these resources from the local cache and not from the Internet
- OR simply add the rule you need on this page in its own markup, e.g.:
    <head id="Head1" runat="server">
        <title></title>
        <style type="text/css">
             .RadEWrongWord{background-color:yellow}
        </style>
    </head>
    <body>

Generally, this rule is only needed by the built-in spellchecked in RadEditor, so until it is called the rule would not be needed. Should you need it for you own layout adding it in the page's CSS is perhaps the easiest option. You could always use a different class name so that you do not rely on the RadEditor stylesheets for your own layout.

Regards,
Marin Bratanov
Telerik
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the blog feed now.
0
John
Top achievements
Rank 1
answered on 03 Oct 2013, 01:17 AM
So I finally discovered the "issue" here. By switching ContentAreaMode="Div" (by default it is iframe) I was able to correct this issue. However the warning on the telerik page for this option does not bode well. Can someone explain what the downside is to using this mode?
0
Marin Bratanov
Telerik team
answered on 03 Oct 2013, 11:26 AM
Hi John,

The DIV content area mode does not strip MS Word formatting and generally relies more on the browsers' rich text editing engines to perform the actual content editing. It is also a part of the main page (while the iframe creates its own context) so it can be affected by other issues on the page (like global CSS rules). Generally, this mode should only be used if some issue is encountered (https warnings, screen readers support, presence of a lot of custom styles on the page). More details are available here: http://demos.telerik.com/aspnet-ajax/editor/examples/contentareamodediv/defaultcs.aspx in the description.


I still do not understand the exact problem you are having and I have offered two options that will let you have the rule you desire available on the page early. With that, you shouldn't need to change to div. In case you do not want all the CSS on the page copied off in the editor's iframe you can set your own stylesheets in the editor and it will not longer wait for all the page's rules to load and will only load your own: http://www.telerik.com/help/aspnet-ajax/editor-setting-content-area-defaults.html.


Regards,
Marin Bratanov
Telerik
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the blog feed now.
Tags
ScriptManager and StyleSheetManager
Asked by
John
Top achievements
Rank 1
Answers by
Marin Bratanov
Telerik team
John
Top achievements
Rank 1
Share this question
or