Copied to clipboard

Flag this post as spam?

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


  • Andre Sousa 15 posts 145 karma points
    Sep 14, 2016 @ 16:59
    Andre Sousa
    0

    Custom Bullet List

    Hi all,

    When i add a bullet list in a rich text editor, the html result is the following:

    <ul>
      <li>Item1</li>
      <li>Item2</li>
      <li>Item3</li>
    </ul>
    

    I'm trying to obtain something like this:

    <ul class="myclassname">
      <li>Item1</li>
      <li>Item2</li>
      <li>Item3</li>
    </ul>
    

    I've been googling around all day and can't find a solution.

    Anyone knows a way to achieve this?

    Thanks in advance,

    Andre Sousa.

  • Nicholas Westby 2054 posts 7103 karma points c-trib
    Sep 14, 2016 @ 18:13
    Nicholas Westby
    100

    Modifying your tinyMceConfig.config file (in the config folder) to look something like this should work:

    <?xml version="1.0" encoding="utf-8"?>
    <tinymceConfig>
        <customConfig>
            <config key="style_formats">[
                {
                    "title": "Specialized List",
                    "selector": "ul",
                    "classes": "myclassname"
                }
            ]</config>
        </customConfig>
    </tinymceConfig>
    

    Then, in the "Styles" drop down above the rich text editor, you should see an entry that says "Specialized List" that will allow you to apply that class to the UL currently selected in the rich text editor.

  • Andre Sousa 15 posts 145 karma points
    Sep 15, 2016 @ 11:12
    Andre Sousa
    0

    Hi Nicholas,

    Interesting idea, i'll give it a shot.

    Thank you for your help.

    Andre Sousa.

Please Sign in or register to post replies

Write your reply to:

Draft