Remove inline font-size and line-height in ul and ol lists in TinyMce

April 23rd, 2014 by Alex Leave a reply »

This bug is very annoying as it produces unnecessary inline styles like this:

<ol>
<li><span style="font-size: 12px; line-height: 100%">list item 1</span></li>
<li><span style="font-size: 12px; line-height: 100%">list item 2</span></li>
</ol>

Not quite what we need, but the fix seems to be pretty easy, all we need is include the lists plugin in tinymce initialization:

tinymce.init({
  ...
  'plugins': 'lists',
  ...
})

And now we have a clean pretty HTML 🙂


Comments are closed.