JSFiddle - React, Tailwind, and code Playground

CSS

body {
  color: black;
  background-color: white;
}

*[contenteditable=false] {
  color: white;
  background-color:black;
}

JavaScript

addEventListener("load", () => {
  document.body.contentEditable = true;
  document.body.focus();
  document.body.innerHTML = "a<span contenteditable=false>b</span>c";
  document.execCommand("selectAll");
  document.execCommand("bold");
}, {once: true});