I'm in no way a coder but I got an idea. I create websites with the tool webflow and when you set up a CMS collection with a rich-text-field the client can add headlines including h1, which I don't want them to. My idea is that with javascript replace every h1 with h2 within a class (so the page title doesn't get changed).
So far I manage to create this:
var e = document.getElementsByTagName('h1')[0];
var d = document.createElement('h2');
d.innerHTML = e.innerHTML;
e.parentNode.replaceChild(d, e);
<h1>Don't change this</h1>
<div class="the-class">
<h1>Replace this with h2</h1>
</div>
Heading
some content