diff --git a/site/examples/rich-text.js b/site/examples/rich-text.js index 8d504a8c5..49b09865c 100644 --- a/site/examples/rich-text.js +++ b/site/examples/rich-text.js @@ -64,8 +64,16 @@ const withRichText = editor => { const { block: type } = command const isActive = isBlockActive(editor, type) const isListType = type === 'bulleted-list' || type === 'numbered-list' - Editor.unwrapNodes(editor, { match: { type: 'bulleted-list' } }) - Editor.unwrapNodes(editor, { match: { type: 'numbered-list' } }) + + Editor.unwrapNodes(editor, { + match: { type: 'bulleted-list' }, + split: true, + }) + + Editor.unwrapNodes(editor, { + match: { type: 'numbered-list' }, + split: true, + }) const newType = isActive ? 'paragraph' : isListType ? 'list-item' : type Editor.setNodes(editor, { type: newType })