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

MOSSRadEditor ContentAreaMode

10 Answers 155 Views
Editor
This is a migrated thread and some comments may be shown as answers.
Shannon Hill
Top achievements
Rank 1
Shannon Hill asked on 25 Sep 2010, 12:01 AM
Hi Telerik Team,

I've implemented the MOSSRadEditor Placeholder for a client who is complaining about the slowness loading the page due to the RadEditor in Edit mode.  There can be as many as 10 placeholders on the page at once and the page loads really slowly as a result.

We want to try ContentAreaMode = 'Div' to see if it offers a speed improvement but we cannot find where to apply this setting.  With the RadEditor it is a simple attribute, but because we are using the MOSSRadEditor placeholder, we cannot set the "ContentAreaMode" property.

I also tried adding: <property name="ContentAreaMode">Div</property> to the config.xml file but this has no effect.

Is this attribute supported with the MOSSRadEditor?  If not, can you suggest things we might be able to do to speed up the loading of the RadEditor in Edit mode?  The client is nearly ready to pull the Editor altogether due to the speed issue.

Thanks

10 Answers, 1 is accepted

Sort by
0
Rumen
Telerik team
answered on 27 Sep 2010, 08:01 AM
Hello Shannon,

Could you please make sure that you use the latest available build 5.8.1 of RadEditor for MOSS, which offers the ContentAreaMode property?

If you use RadEditor for MOSS in SharePoint forms scenario (Lists, Wikis, Blogs, etc.), you need to modify the ListConfigFile.xml located in the same folder.


Best regards,
Rumen
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Shannon Hill
Top achievements
Rank 1
answered on 15 Oct 2010, 01:41 AM
Thanks for the suggestion.  Using the new ContentAreaMode does offer a good speed improvement.  However, the only issue I have now is that the "Reusable Text" toolbar icon produces a JavaScript error "Object required" on line 194 in MOSSEditorTools.js. All of the other toolbar icons appear to work fine.  Screenshot of the error is attached.  Is this a know bug and if so, is there an update JS file I can replace this one with?

Update: After a little more investigation, it appears that all of the toolbar buttons that open MOSS windows have the same issue.  It appears the issue is when they try to get a reference to the "frame" of the RadEditor.  It seems that the "frame" has changed now that the ContentAreaMode is "Div".  I would assume there's some new logic that needs to be placed here to support the "Div" mode.

Thanks,

-Shannon
0
Stanimir
Telerik team
answered on 20 Oct 2010, 12:14 PM
Hi Shannon Hill,

Thank you for the provided information. This problem will be fixed in the next release of RadEditor for MOSS. In mean time do the following changes in the MOSSEditorTools.js.

Replace code such as:
var elemImage = FormJSRTE_GetNearestContainingParentElementOfTypes(editor.get_contentWindow().frameElement.id, elemToReplace, new Array("IMG"));

with

var frameElementId = (editor.get_contentAreaMode() == Telerik.Web.UI.EditorContentAreaMode.Div) ? editor.get_contentArea().id : editor.get_contentWindow().frameElement.id;
var elemImage = FormJSRTE_GetNearestContainingParentElementOfTypes(frameElementId, elemToReplace, new Array("IMG"));

For your convenience I attached a modified file:





Sincerely yours,
Stanimir
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Shannon Hill
Top achievements
Rank 1
answered on 22 Oct 2010, 12:33 PM
Stanmir,

Thanks for your help thus far.  Your fix below cleared up the problem I was having with the toolbar icons and the Div mode works great!  Now, there's just one last issue that's come up due to Div mode.  In my config.xml file, I had previously set the property "TableLayoutCssFile" to a particular file that had our unique table styles.  Now, that property is being ignored and the table property editor dialog is picking up random styles from other stylesheets, rather than the ones from my table css file.

If I remove the property from the config file, I get the Telerik styles tables 1- 5.  My file was located at "/_layouts/namespace/tables.css".  This doesn't seem to work anymore.  I've tried putting this property before and after the ContentAreaMode setting but it made no difference.

Could you please help me resolve this final issue?

Thanks,

-Shannon Hill
0
Stanimir
Telerik team
answered on 25 Oct 2010, 07:49 AM
Hi Shannon Hill,

In Div mode when you set the TableLayoutCssFile property you need to make sure that the css file is loaded in the page as well. So what you need to do is load the file manually by editing your master page for example.


All the best,
Stanimir
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Shannon Hill
Top achievements
Rank 1
answered on 25 Oct 2010, 12:15 PM
Stanmir,

The CSS file is already manually loaded into the master page.  The styles in it just don't show up as valid options in the Table Properties dialog.  With the file being added to the master page manually, how does the RadEditor know that this particular file contains the "Tables" styles?  It is just in the header like any other CSS file:

<link rel="stylesheet" type="text/css" href="/sites/Library/_layouts/Customer.SharePoint.Navigation/tables4.css"/>
0
Stanimir
Telerik team
answered on 25 Oct 2010, 03:50 PM
Hello Shannon Hill,

If you place the TableLayoutCss.css file in the Program Files\Common Files\Microsoft Shared\web server extensions\wpresources\RadEditorSharePoint\5.8.1.0__1f131a624888eeed\Resources folder, you need to have the following tag in the master page:
<link rel="stylesheet" type="text/css" href="/_wpresources/RadEditorSharePoint/5.8.1.0__1f131a624888eeed/Resources/TableLayoutCss.css">

and the following code in the ConfigFile.xml:
<property name="TableLayoutCssFile">/_wpresources/RadEditorSharePoint/5.8.1.0__1f131a624888eeed/Resources/TableLayoutCss.css</property>


I hope this helps.

Best wishes,
Stanimir
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Obaid Ullah
Top achievements
Rank 1
answered on 23 Feb 2011, 04:15 PM
Hi Telerik Team,
I am using MossRadEditor (5.8.6.0 trial version) for my sharepoint site. I want to include external css files dynamically to the moss editor so that classes appear in the "Apply CSS Class" drop down. I need to do this because my each sitecollection has a unique style sheet and each style sheet is located in the styles library of each sitecollection's root web.
As was mentioned in telerik forums i did

radEditor1.ToolsFile = "~/ToolsFile.xml";
radEditor1.CssFiles.Add(new EditorCssFile("http://test.mysite.com/Style%20Library/teststyle.css"));

But this is not working. I also tried by manually adding the files in moss rad editor tags in my user control ascx file.
<telerik:MOSSRadEditor ID="radEditor1" runat="server" ToolsFile="/_wpresources/RadEditorSharePoint/5.8.6.0__1f131a624888eeed/Resources/toolsfile.xml">
<CssFiles>
<telerik:EditorCssFile Value="http://test.mysite.com/Style%20Library/teststyle.css" /> 
</CssFiles>
</telerik:MOSSRadEditor>

 

This is also not working. However when i added the cssfiles tag in the ToolsFile.xml, it worked great but i don't need that. I tried all these things for simple asp.net rad editor and it works in all above scenarios. Please tell me what i m doing wrong for the moss rad editor.

Thanks
Obaid

0
Stanimir
Telerik team
answered on 25 Feb 2011, 07:44 AM
Hi Shannon Hill,

I need to do this because my each sitecollection has a unique style sheet and each style sheet is located in the styles library of each sitecollection's root web - What I suggest you to do is add a different ToolsFile.xom for each site collection. You can find the needed information in the following online help article: Different configuration files for different webs. It is for different webs, but you can use the same approach for different collections.

Best wishes,
Stanimir
the Telerik team
Registration for Q1 2011 What’s New Webinar Week is now open. Mark your calendar for the week starting March 21st and book your seat for a walk through all the exciting stuff we ship with the new release!
0
Obaid Ullah
Top achievements
Rank 1
answered on 01 Mar 2011, 04:00 PM
Hi Telerik Team,
   ToolsFile with sitecollection Guid worked. Thanks!!.

Best Regards
Obaid
Tags
Editor
Asked by
Shannon Hill
Top achievements
Rank 1
Answers by
Rumen
Telerik team
Shannon Hill
Top achievements
Rank 1
Stanimir
Telerik team
Obaid Ullah
Top achievements
Rank 1
Share this question
or