We use body fields for a blog. To make the text editing easy for non-developers we use the RichTextEditor. For semantic and SEO reasons we need the header sections of the body to have
<h2> tags. Currently in the RTE it’s only possible to generate
<h1> header tags. So in our backend we change the
<h1> tags generated by the RTE to
<h2> tags, which are then nicely displayed on the website.
We expect the RTE not to change our
<h2> tags when editing the field. Ideally we would like to add
<h2> tags from within the RTE.
When we edit the field, the RTE gets rid of the
<h2> tags (turns them into
<p> tags, sometimes with
<strong> tags around them)… We don’t understand why the RTE does this and we don’t think it should remove tags that we explicitly added. Because we then have to re-edit the field, add header tags (
<h1>), which on our backend changes them back to the
This is time consuming and frustrating for the blog editors.
Project name: Sylvaine
Using Rails 5.2.3 with Liana 4.1.2
Database: PostgreSQL 11.5