Skip to content

Function: createEditor() ​

ts
function createEditor(options): Editor;

Create an editor.

Parameters ​

ParameterType
optionsEditorOptions

Returns ​

Editor

Example ​

ts
const editor = createEditor({
  element: document.querySelector('#editor'),
  extensions: basic(),
  content: savedDoc,
  label: 'Article text',
  onChange: debounce((editor) => save(editor.getJSON()), 500),
})