Embed RichText.online

Add a container and the script — the editor loads inside an isolated iframe.

<div id="editor"></div>
<script src="https://richtext.online/embed.js"></script>
<script>
  var ed = RichTextEditor.create('#editor', {
    height: 400,                        // number (px) or any CSS size
    content: '<p>Initial HTML</p>',    // optional
    onChange: function (html) { /* fires as the user types */ }
  });
  ed.getHTML().then(function (html) { /* current content */ });
  ed.setHTML('<p>Replace content</p>');
</script>

Or declaratively: <div data-richtext-editor data-height="400"></div>

The HTML you get back is user-authored — sanitise it (e.g. DOMPurify) before rendering it on your own pages.

Live demo