We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 32822
    • 18 Posts
    I’m trying to add classes to heading tags in the editor. I have added the appropriate class via the system settings and it is available to choose but when I put my cursor inside the heading and select the style, nothing happens. If I highlight the whole heading and select the style it inserts a span - not what I want. Am I doing this wrong? Do I need to set something else up?

    Thanks for your help
      • 26016
      • 561 Posts
      Hi,
      I would have to guess that you’re using Evo. Revo has issues with this working at all.

      That being the case, yes, you have to highlight something in order for it to be styled in this way. And for once, I actually agree with how Tiny is implementing it - a SPAN with a class seems to me to be the least invasive HTML to add to something. By the way, if you simply are not seeing a class on the span, chances are you’ve mis-coded the config.

      I did it both ways, adding my style to plain text. And also your way: I highlighted some text, made it into Heading 1, and then added my style to that, worked like a charm. But you have to highlight what you want to style.

      Rather than going through all this, I generally just style several types of heading tags in the CSS. Then if the person wants, say, a blue heading of a certain size in content, I just tell them select Heading 5, and boom, there it is. Easy.
        MODx and Wordpress development
        Linux, PHP 5.2, MySQL 5.0, Evo 1.05, Revo 2.08-pl, Firefox 4
        • 32822
        • 18 Posts
        Thanks for the reply

        Nope, I am using Revo, v.2.04 (hence the post in the Revo forum smiley).

        I want to have meaningful syntax, so the route of styling up a tag like a heading 5 is not the way I’d like to go. The heating I want to style is semantically as h2, just needs the extra class and as it is, the span is useless to me.

        Any other thoughts anyone?