Editor.js is a so called βblock style editorβ like the one Medium (and recently WordPress) sport.
The Editor.js workspace consists of separate Blocks: paragraphs, headings, images, lists, quotes, etc. Each of them is an independent contenteditable element (or more complex structure) provided by Plugin and united by Editor’s Core.
The output is not HTML but a JSON object which describes each Block.
All you need is contenteditable and execCommand. The JavaScript essence of the editor is just a few lines of code. Oh, how things have changed over the years.