In TinyMCE, how can I pre-define CSS class for unordered list <ul>.
The idea is that I write my article in TinyMCE editor, then once the content is saved, the final HTML is:
<ul class="class_a">
...
</ul>
I'm using django-tinymce.
In TinyMCE, how can I pre-define CSS class for unordered list <ul>.
The idea is that I write my article in TinyMCE editor, then once the content is saved, the final HTML is:
<ul class="class_a">
...
</ul>
I'm using django-tinymce.
Copyright © 2021 Jogjafile Inc.
The only solution seems to create a plugin, but it's very complex to keep the DOM values. So I found this alternative solution.
Style the default
ulandolin your CSS (putclass_astyles into them, without class applied)Add
styleselectin your TinyMCE toolbarAdd
style_formatsoption to style your ul and ol like this for example:style_formats: [ { title: 'Unstyled list', selector: 'ul,ol', classes: 'list-none' } ]