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

How to setup TableLayoutCssFile in RadEditor for sharepoint 2010

2 Answers 27 Views
Sharepoint Integration
This is a migrated thread and some comments may be shown as answers.
Adam
Top achievements
Rank 1
Adam asked on 20 Aug 2012, 01:01 PM
Hello,

How can I set the css file needed to display different table layouts in table creator in RadEditor for Sharepoint 2010. In "normal" RadEditor setting value:
<telerik:RadEditor TableLayoutCssFile = "/_layouts/1045/STYLES/tableStyles.css" ... />

works well and all table layouts are properly displayed in Table Creator dialog. Doing the same in Rad Editor for Sharepoint by setting the same value in ConfigFile.xml located in: 
C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\wpresources\RadEditorSharePoint\6.3.0.0__1f131a624888eeed\Resources\ConfigFile.xml like this:

<configuration>
  <property name="TableLayoutCssFile">/_layouts/1045/STYLES/tableStyles.css</property>
</configuration>

does not work. 

Should it be done in another way?

Thank you in advance.

2 Answers, 1 is accepted

Sort by
0
Adam
Top achievements
Rank 1
answered on 21 Aug 2012, 12:48 PM
When I set the value like that:
<property name="TableLayoutCssFile">
    <item>/_wpresources/RadEditorSharePoint/6.3.0.0__1f131a624888eeed/Resources/tableStyles.css</item>
  </property>

and check the logs with ULS viewer I can notice that, there is a request to the proper url:

Name=Request (GET:http://dskpok103:80/_wpresources/RadEditorSharePoint/6.3.0.0__1f131a624888eeed/Resources/tableStyles.css)

and no exception messages, which might indicate that file is fetched properly, still when I open Insert Table -> Table Creator ->Table Properties there is no desired effect. 
0
Accepted
Stanimir
Telerik team
answered on 23 Aug 2012, 08:00 AM
Hi,

Setting the TableLayoutCssFile like
<property name="TableLayoutCssFile">
    <item>/_wpresources/RadEditorSharePoint/6.3.0.0__1f131a624888eeed/Resources/tableStyles.css</item>
</property>
is correct. What you also need to do is load the tableStyles.css file in the page where the editor is added. The reason for this is that in WCM and WebPart scenarios the editor's content area is a DIV element and we can not afford to add css styles automatically in the page. This is not the case when the content area of the control is an IFRAME element, because adding styles in it does not affect the page where RadEditor is loaded.


Greetings,
Stanimir
the Telerik team
Learn how the Telerik controls can be integrated in SharePoint 2007/2010 from this resource. To watch them in action, explore our online SharePoint 2010 demo site.
Tags
Sharepoint Integration
Asked by
Adam
Top achievements
Rank 1
Answers by
Adam
Top achievements
Rank 1
Stanimir
Telerik team
Share this question
or