+1-888-365-2779
Try Now
More in this section

Forums / Designing with Sitefinity / How do I add styles to the hyperlink manager in the generic content editor

How do I add styles to the hyperlink manager in the generic content editor

2 posts, 0 answered
  1. Nancy
    Nancy avatar
    18 posts
    Registered:
    25 Jan 2008
    30 Jan 2008
    Link to this post
    I want to add a couple of link styles to the hyperlink manager in the generic content editor of my site.  I poked around and added a style to the \Sitefinity\Admin\Themes\Default\EditorStyles.css file under .read and .attention.

    .special
    {
        color: #aa1319;
    }

    I also added <class name="special" value=".special" /> to the classes section of \Admin\ControlTemplates\EditorToolsFile.ascx.  It's not showing up in the dropdown of my hyperlink manager when I edit a generic content item.  Am I missing something?
  2. Pepi
    Pepi avatar
    981 posts
    Registered:
    08 Dec 2016
    31 Jan 2008
    Link to this post
    Hello Nancy,

    Generic Content can be configured to load external CSS files. It is best to put your styles in an external .css file (e.g.
    EditorStyles.css ) and specify the path to it in the \Sitefinity\Admin\ControlTemplates\Generic_Content\EditorTemplate.ascx like this:

    <radE:RadEditor runat="server" ID="RadEditor1" 
        ConfigFile="~/Sitefinity/Admin/ControlTemplates/EditorConfigFile.xml" 
        CssFiles="~/Sitefinity/Admin/Themes/Default/EditorStyles.css" 
        SkinsPath="~/Sitefinity/Admin/Themes/Default/Skins/Editor/" 
        Skin="Sitefinity" ConvertFontToSpan="true" ConvertToXhtml="true" NewLineBr="false" 
        Height="360px" Width="98%"

    After that, in the \Sitefinity\Admin\ControlTemplates\EditorToolsFile.xml file, add your classes to the classes collection to populate the Apply CSS dorpdown as shown below.

    <classes> 
       <class name="Links class" value="a.link" /> 
       <class name="Special" value=".special" /> 
    </classes> 

    You could find more information in the RadEditor online help (Toolbars and DropDowns sections). We would recommend the following RadEditor articles:

    1. CSS Styles
    2. External CSS Files
    3. Using CSS Styles


    Hope this helps. Do let us know if you need any further assistance.

    Best wishes,
    Pepi
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
2 posts, 0 answered