viewof editor = {
const editor = createEditor();
const style = `
padding: 0 16px;
margin: 0;
border: 1px solid #aaa;
outline-offset: -2px;
`;
const root = html`<div
contentEditable="true"
spellCheck="false"
autoCapitalize="false"
style="${style}"
></div>`;
editor.setRootElement(root);
const historyState = lexicalHistory.createEmptyHistoryState();
lexicalPlaintext.registerPlainText(editor);
lexicalHistory.registerHistory(editor, historyState);
root.value = editor;
return root;
}