This doesn’t appear to be possible without a plugin. The formattingAdd will add additional options to the Formatting menu, but will not alter the behavior of any of the other buttons, and you can only set the tag
properties to p
, pre
, blockquote
, and h[1-6]
.
Another option might be to use a Matrix field with two block types: Text and List. Text blocks would have a Rich Text field, and List blocks would have a Table field with one column, plus a Dropdown field that specifies what the class should be. From your templates you would do this:
{% for block in entry.myMatrixField %}
{% if block.type == 'text' %}
{{ block.text }}
{% elseif block.type == 'list' %}
<ul class="{{ block.myDropdownField }}">
{% for row in block.myTableField %}
<li>{{ row.myColumnHandle }}</li>
{% endfor %}
</ul>
{% endif %}
{% endfor %}
If you really want to keep all this within Redactor and go the plugin route, you can use our Redactor Clips plugin as a starting point.