Copied to clipboard

Flag this post as spam?

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


  • Eyal 3 posts 23 karma points
    Jul 03, 2012 @ 23:56
    Eyal
    0

    creating css for the richtext editor - different classes on the same tag

    Hi,

    I'm trying to add some css classes/properties to the editor and I've managed to add some tags and classes separately. The only thing I'm having trouble with is adding a tag+class to the stylesheet property. For example, I want to have 2 <a> styles to choose from: a.link1 and a.link2. I added a stylesheet property and set the alias to a.link1 and gave it all the css stuff I wanted it to have. I can select it in the editor but it doesn't give it any style. Viewing the html, all i get is <a href="#">my text</a>... no class applied. Also, I noticed that right after selecting from the drop down the drop down goes back to "styles".

    What am I doing wrong? is it possible to do this?

    Thanks,

    Eyal

  • Chriztian Steinmeier 2726 posts 8320 karma points MVP 4x admin c-trib
    Jul 04, 2012 @ 00:20
    Chriztian Steinmeier
    0

    Hi Eyal,

    What I've been able to get working is to define the styles without the tagname (a) on the aliases, so: .link1 and .link2, and then *not* writing the CSS in those, but writing the correct CSS for them in the file (when you click the filename):

    a.link1 { color: #f00; }
    a.link2 { color: #0f0; }

    - leaving off the tagName from the alias allows you to apply them to links, and including them in the CSS makes them seem to only apply to links (even though it's possible give those classes to other elements, they won't seem to have any effect).

    /Chriztian

  • Eyal 3 posts 23 karma points
    Jul 04, 2012 @ 15:03
    Eyal
    0

    Thanks... I'll give it a shot.

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies