Copied to clipboard

Flag this post as spam?

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


  • julius 107 posts 289 karma points
    Feb 15, 2012 @ 23:47
    julius
    0

    Add CSS classes to items in the RTE

    Hello,

    I am not sure I understand Umbraco's css functionality. I have create a new stylesheet and added some styles in teh Settings sections. One of my styles is named "Code", has the alias ".code" and I added some CSS in the Styles field.

    My new "Code" style does show up in the RTE, but when I select some text and try to apply the style, nothing happens. What I want is that the RTE sets class="code" on the <p> or something, so that the text actually appears with the code style that I entered when I publish the page.

     

  • Sharon 16 posts 37 karma points
    Feb 16, 2012 @ 09:09
    Sharon
    0

    Did you associate the CSS to the RTE in the TinyMCE DataType at the "developper" section?

  • julius 107 posts 289 karma points
    Feb 16, 2012 @ 09:48
    julius
    0

    Yep

  • julius 107 posts 289 karma points
    Feb 18, 2012 @ 22:43
    julius
    0

    Any clues? I want to add a CSS class to an element in the RTE using the CSS dropdown in the RTE.

    I created my "Code" style  under settings > stylesheets > TextStyles (TextStyles being my css file)
    The Code style shows up in the RTE, but when I select some text and then select the Code style, nothing happens. When I save the page the style on the published page hasn't changed either. And when I use the HTML button in the RTE I don't see a ".code" class added anywhere.

    I am including the TextStyles.css file on all my pages.

  • Nigel Wilson 944 posts 2076 karma points
    Feb 19, 2012 @ 18:48
    Nigel Wilson
    0

    Hi Julius

    When viewing the style in the stylesheet area is the formatting appearing in the Preview Box ?

    Can you provide an screenshot  of your custom style?

    Also are you able to provide a screenshot of the actual stylesheet file from Visual Studio (or similar) Maybe just the part below the "Editor Properties" line

    Cheers

    Nige

Please Sign in or register to post replies

Write your reply to:

Draft