We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 5532
    • 251 Posts
    Hi There,

    I’ve set up some styles and added the styles to the CSS selectors for tinyMCE.

    When I apply the styles to images and links, things work as expected. I get:
    <img class="float-left"

    Or:
    <a class="buttonorange"

    But when applying classes to text, rather than <p class="boxred" I get:
    <span style="font-family: __;">

    Is there a way get tinyMCE to add classes to P tags like this?

    Also, is there a way to wrap a block of text in a div with a class to get something link this:
    <div class="boxred">
    <h3>Headline<h3>
    <p>Body text goes here</p>
    </div>


    Instead I get this:
    <div><h3>Headline<h3></div>
    <div><p>Body text goes here</p></div>


    Any help would be much appreciated.

    Cheers
      • 23571
      • 223 Posts
      Inside of Resources/Manage Resources/Plugins/TinyMCE/Configuration/Plugin configuration: you can affect changes to the tags that TinyMCE offers.
        • 5532
        • 251 Posts
        Thank you, I’ve only just realised that tinyMCE is a third-party product!

        Does that mean you can install tinyMCE plugins and customise it as per the tinyMCE website?
          • 5532
          • 251 Posts
          I’ve had a look but to be honest I don’t really know what I’m looking at!

          I think something has changed as looking through previous pages, tinyMCE was able to correctly apply classes to <p> tags - maybe there’s a limit on the number of custom classes?