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

Forums / Developing with Sitefinity / Best Prctice for CSS Styles / Styling in RadEditor (5.0 SE)

Best Prctice for CSS Styles / Styling in RadEditor (5.0 SE)

3 posts, 0 answered
  1. Markus
    Markus avatar
    2763 posts
    Registered:
    25 Nov 2005
    21 Mar 2012
    Link to this post
    I guess 99.9 of all users would love to have the RadEditor to be realy WYSIWYG.

    This means I have to somehow use my theme css to be used inside the RadEditor.
    I guess there are two ways to do this at the moment

    There was an post http://www.sitefinity.com/blogs/joshmorales/posts/11-07-26/customizing_sitefinity_4_controls_with_the_viewmap.aspx but I think that 5.0 gives us other resources to to this.

    I tried the following

    a) created my /css/rad_editor_styles.css with same styles as in my thme
    b) Admin - Settings - Advanced - Appearance - Set the string to my rad_editor_styles.css (css styles_01.png)
    c) cleard cache (did not restart app) and the styles were NOT applied

    I tried the following then.

    a) Settings - Basic - Text Editor - Edit default Tool set
    b) Added   </tools>
    <paragraphs>
            <paragraph name="Normal" value="&lt;p>" />
            <paragraph name="&lt;H1>Überschrift 1&lt;/H1>" value='&lt;H1 class="h1">' />
            <paragraph name="&lt;H2>Überschrift 2&lt;/H1>" value='&lt;H2 class="h2">' />
            <paragraph name="&lt;H3>Überschrift 3&lt;/H3>" value='&lt;H3 class="h3">' />
            <paragraph name="&lt;H4>Überschrift 4&lt;/H4>" value='&lt;H4 class="h4">' />
            <paragraph name="&lt;H4>Überschrift 5&lt;/H4>" value='&lt;H4 class="h5">' />
        </paragraphs>
      <cssFiles>
            <item name="~/css/rad_editor_styles.css" />
        </cssFiles>
    </root>
    c) cleard cache (did not restart app) and the styles were NOT applied

    -------------
    Question is. What am I doing wrong.
    What is the best pracitce - dont want to start mapping templates in every project.

    Markus

    body
    {
        background-color: #fff !important;
        font-family: Arial, Helvetica, sans-serif;
        font-size: 14px;
        color: #444;
        margin-top:0px;
    }
    h1,
    .h1
    {
        margin-top: -5px;
      /*  color: #105cb6; */
      color:#f00;
        font-size: 22px !important;
    }
    h2,
    .h2
    {
        color: #be8104;
        font-size: 16px !important;
    }
    h3,
    .h3
    {
        color: #be8104;
        font-size: 14px !important;
    }
    h4,
    .h4
    {
        color: #be8104;
        font-size: 12px !important;
    }
    h5,
    .h5
    {
        color: #be8104;
        font-size: 10px !important;
    }
    a
    {
        color:black;
        font-weight:bold;
        text-decoration: none;
    }
    a:hover
    {
     
        text-decoration: underline;
    }
     
    a img{border:0;}
  2. Markus
    Markus avatar
    2763 posts
    Registered:
    25 Nov 2005
    23 Mar 2012
    Link to this post
    A day later it seems to have picked up the editor styles.
     But the Heading do not use the styles yet
    Markus
  3. Aniko Erlinger
    Aniko Erlinger avatar
    2 posts
    Registered:
    02 Jan 2010
    13 Jun 2013 in reply to Markus
    Link to this post
    Restarting the IIS is the key.
3 posts, 0 answered