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

Forums / General Discussions / Generic Content CSS

Generic Content CSS

6 posts, 0 answered
  1. Dino
    Dino avatar
    24 posts
    Registered:
    20 Dec 2008
    01 Oct 2009
    Link to this post
    How do you get the CSS Class drop down box to populate in the table wizard for the Generic content editor?
  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    25 Nov 2016
    01 Oct 2009
    Link to this post
    Hi Dino,

    Please take a look at the following article - CSS Styles. Let us know if there is anything else that we can do for you.

    Best wishes,
    Ivan Dimitrov
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
  3. Dino
    Dino avatar
    24 posts
    Registered:
    20 Dec 2008
    02 Oct 2009
    Link to this post
    It does not seem to be working.  I've attached my GenericContentDesigner.ascs and EditorToolsFile.xml files
  4. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    25 Nov 2016
    02 Oct 2009
    Link to this post
    Hi Dino,

    You could attach only images. However try adding the classes programmatically on Page_Load event.

    Sincerely yours,
    Ivan Dimitrov
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
  5. Dino
    Dino avatar
    24 posts
    Registered:
    20 Dec 2008
    02 Oct 2009
    Link to this post
    That is not working either.  I mapped the view to the external template and I know it works because I can change the skin of the RadEditor and it reflects when I make that change.  Below is a code snippet in the designer file.

    <telerik:RadEditor  
        runat="server"  
        OnClientLoad="OnClientLoad" 
        ID="textEditor" 
        ContentAreaCssFile="~/Sitefinity/Admin/Themes/Default/AjaxControlsSkins/Sitefinity/EditorContentArea.css" 
        ToolsFile="~/Sitefinity/Admin/ControlTemplates/EditorToolsFile.xml"     
        Skin="WebBlue"     
        NewLineBr="False" 
        Height="360px"  
        Width="98%"  
        ContentFilters="FixUlBoldItalic,FixEnclosingP,IECleanAnchors,MozEmStrong,ConvertFontToSpan,ConvertToXhtml,IndentHTMLContent">  
        <ImageManager ViewPaths="~/Images" UploadPaths="~/Images" DeletePaths="~/Images" /> 
        <MediaManager ViewPaths="~/Files" UploadPaths="~/Files" DeletePaths="~/Files" /> 
        <FlashManager ViewPaths="~/Flash" UploadPaths="~/Flash" DeletePaths="~/Flash" /> 
        <DocumentManager ViewPaths="~/Files" UploadPaths="~/Files" DeletePaths="~/Files" /> 
        <CssFiles> 
            <telerik:EditorCssFile Value="~/Sitefinity/Admin/Themes/Default/AjaxControlsSkins/Sitefinity/EditorContentArea.css" /> 
        </CssFiles> 
        <CssClasses> 
           <telerik:EditorCssClass Name="test" Value=".test" /> 
       </CssClasses> 
    </telerik:RadEditor> 

    Even the css files are partially working.  I say partially because I can modify the EditorContentArea.css file to remove dotted lines around the tables and that works fine.  But a simple background-color:#FF0000; to the body element in the css file does not show up in the RadEditor.

    I'm stumped to at this point.
  6. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    25 Nov 2016
    04 Oct 2009
    Link to this post
    Hello Dino,

    Please try one of the following methods.

    Using  EditorToolsFile

    1. Open ~/Sitefinity/Admin/ControlTemplates/EditorToolsFile.xml file
    2. Specify the path to the css file, which you need the editor to use:

     
     
    <root>      
     
    ...      
     
      <cssFiles>      
     
        <item name="~/Sitefinity/Admin/ControlTemplates/Custom.css" />      
     
      </cssFiles>      
     
    ...      
     
    </root>      
     

     3. Delete the <class> elements which appear as child elements of an element <classes>:

    <class name="Add CssClasses:" value=".test" />      
    <class name="EditorToolsFile.xml" value=".test1" />      
     

    Programmatically.

    1. Map the external template for the desired view.
    2. Add inline code to the template and specify your css file with the custom classes.

    <script type="text/C#" runat="server"
     
        protected void Page_Load(object sender, EventArgs e) 
        { 
            Editor.CssFiles.Add("~/test/test.css"); 
        } 
     
    </script>

    I hope this helps.

    Greetings,
    Ivan Dimitrov
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Register for webinar
6 posts, 0 answered