JSFiddle - React, Tailwind, and code Playground

HTML

<rich-editor>Added via HTML</rich-editor>

CSS

rich-editor { border: 2px solid #2f4858; border-radius: 3px; background-color: #f0fff0; display: block; width: 100px; height: 100px; padding: 3px }

JavaScript

class RichEditor extends HTMLElement {}
window.customElements.define('rich-editor', RichEditor)

let editor = document.createElement('rich-editor')
editor.innerHTML = "<strong>Added via JS</strong>"
document.body.appendChild(editor)