By default, TinyMCE allows the h1
--h6
elements to include a <strong>
element, but it's problematic, since with some fonts the default strong weight of the header tags is then added by extra weight, which looks terrible.
I've tried using the valid_children
option:
valid_children : '-h1[strong],-h2[strong],-h3[strong],-h4[strong],-h5[strong],-h6[strong]'
However, while this prevents implementing <strong>
on h1
--h6
, it resolves existing cases by removing the h1
-h6
elements and replacing those with p
elements:
<h3><strong>Subtitle goes here</strong></h3>
Is converted into:
<p><strong>Subtitle goes here</strong></p>
The desired behaviour, however, is:
<h3>Subtitle goes here</h3>
How can that be achieved?