Setting up an editor

Using the example setup, example menu, and basic schema modules, setting up an editor can be done in a few lines.

let view = new MenuBarEditorView(document.body, {
  state: EditorState.create({
    plugins: exampleSetup({schema})

(In a more demanding situation, where you want to configure your editor and wire it into your own UI style, you'll probably want to swap out the example setup and menu modules with something custom, and adjust the schema to your needs.)

The source code for this example can be found on github.