How to setup TableLayoutCssFile in RadEditor for sharepoint 2010

3 posts, 1 answers
  1. Adam
    Adam avatar
    13 posts
    Member since:
    Nov 2011

    Posted 20 Aug 2012 Link to this post

    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. Adam
    Adam avatar
    13 posts
    Member since:
    Nov 2011

    Posted 21 Aug 2012 Link to this post

    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. 

  3. Answer
    Stanimir
    Admin
    Stanimir avatar
    1653 posts

    Posted 23 Aug 2012 Link to this post

    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.
Back to Top