Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • daxu 22 posts 28 karma points
    Feb 04, 2010 @ 14:20
    daxu
    1

    apply css in Richtext editor?

    Hi,

     

    I linked css with RichText editor (go to data type and ticked the css file I want and clicked save). But when I go back to content, the only style I can see is something called "sub header", which is bit strange as my css file doesn't even contain this name. Can someone give me a hand?

     

    Many Thanks

  • daxu 22 posts 28 karma points
    Feb 04, 2010 @ 14:28
    daxu
    0

    I see.

    Seems I need to create a item under the selected css file and put my css there. It won't pick up contents from css file directly.

  • daxu 22 posts 28 karma points
    Feb 04, 2010 @ 14:40
    daxu
    0

    Sorry,

    Still confused.

    I choose the default editor css file, under it, there is something called sub header, which has styles and alias defined. By default, alias is h3 and styles are:

    color:#F49AC1;
    font-size:18px;

    I change the alias to h1 or hello2, but no matter what I change, the rendered html still shows under h3:

    <h3></h3>

    My problem is that h3 has been defined in other css file which linked in the master page. Although the editor is showing the style I wants, on the rendered page, it is using the css style from the css file linked in the master page (as it is more specific). So did I do something wrong?

     

    Many Thanks

  • dandrayne 1138 posts 2262 karma points
    Feb 04, 2010 @ 14:59
    dandrayne
    0

    using the styles in editor-stylesheets will only apply to the editor itself, so you'd need to redefine the styles in the frontend.  Also, if you already have styles applied to elements within the editor, changing the alias won't change existing html - you'd need to remove and reapply the styles.

    http://our.umbraco.org/wiki/how-tos/customizing-the-wysiwyg-rich-text-editor-%28tinymce%29/add-styles-to-the-drop-down-menu-for-editors-to-use might help explain things a little better.

  • moseeds 13 posts 29 karma points
    Feb 05, 2010 @ 12:31
    moseeds
    0

    As an aside - be careful applying large stylesheets to the RichTextEditor in my experience this causes the content load time to escalate dramatically (from seconds to sometimes minutes). 

Please Sign in or register to post replies

Write your reply to:

Draft