Make the editor WISYWIG by inheriting site styles (CSS)

4 posts, 0 answers
  1. Hefin Jones
    Hefin Jones avatar
    4 posts
    Member since:
    Nov 2009

    Posted 15 Nov 2011 Link to this post

    Hello,

    We currently have Rad editor installed on our instance of MOSS 2007, publishing protal to allow users to update content on web pages, this works fine but the editor doesn't seem to be WISYWIG, it doesn't seem to be using the CSS files associated with our website, but when the page is redered in normal website viewing mode - the styles are picked up fine.

    Is there a way to configure the Rad Editor within Sharepoint to pick up the CSS file(s) being used on the website?

    We are currently using the following code within our Master Pages / Page layouts:

    <%@ Register TagPrefix="telerik" Namespace="Telerik.SharePoint.FieldEditor" 
    Assembly="RadEditorSharePoint, Version=5.3.2.0, culture=neutral, 
    PublicKeyToken=1f131a624888eeed" %>

    <telerik:RadHtmlField 
    id="Content" DisplayWidth="1000px" FieldName="PublishingPageContent" 
    runat="server" 
    AllowSpecialTags="true"></telerik:RadHtmlField>

    Your help would be greatly appreciated.

    Thanks
    Hefin Jones
  2. Rumen
    Admin
    Rumen avatar
    12846 posts

    Posted 15 Nov 2011 Link to this post

    Hello Hefin,

    Please, see the following help article on the subject: Defining custom CSS styles.


    Best wishes,
    Rumen
    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 and SharePoint 2007 demo sites.

  3. Hefin Jones
    Hefin Jones avatar
    4 posts
    Member since:
    Nov 2009

    Posted 17 Nov 2011 Link to this post

    Thanks for your reply,

    This method does seem to work - but it works globally for all our sites using the editor.  Is there a way to apply a CSS on a per site basis e.g. Site 1 takes Site 1 CSS, Site 2 takes Site 2 CSS?
  4. Rumen
    Admin
    Rumen avatar
    12846 posts

    Posted 17 Nov 2011 Link to this post

    Hello Hefin,

    You can create different ToolsFiles for the editors used by the different sites following the instructions provided in this article: Different configuration files for different webs.
    In every toolsfile.xml set the CssFiles property to point to the desired site specific CSS files.

    ToolsFile{a63cff5e-cdf5-48d0-898d-f9a24d299f06}.xml
    <cssFiles>
           <item name="/_wpresources/RadEditorSharePoint/5.x.x.0__1f131a624888eeed/Resources/Site1.css" />
    </cssFiles>

    ToolsFile{b83cff5e-cdf5-48d0-898d-f9a24d299f26}.xml
    <cssFiles>
           <item name="/_wpresources/RadEditorSharePoint/5.x.x.0__1f131a624888eeed/Resources/Site2.css" />
    </cssFiles>


    Best regards,
    Rumen
    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 and SharePoint 2007 demo sites.
Back to Top