diff --git a/src/examples/nested-lists.tsx b/src/examples/nested-lists.tsx new file mode 100644 index 00000000..fde570e4 --- /dev/null +++ b/src/examples/nested-lists.tsx @@ -0,0 +1,32 @@ +import React from 'react' +import { MDXEditor, listsPlugin, diffSourcePlugin, toolbarPlugin, DiffSourceToggleWrapper, UndoRedo } from '..' + +const listsMarkdown = ` +* hello +* world + * indented + * more +* back +` + +export function NestedLists() { + return ( + { + console.log(md) + }} + plugins={[ + listsPlugin(), + diffSourcePlugin(), + toolbarPlugin({ + toolbarContents: () => ( + + + + ) + }) + ]} + /> + ) +} diff --git a/src/plugins/lists/LexicalListItemVisitor.ts b/src/plugins/lists/LexicalListItemVisitor.ts index 601f6536..d82c6e47 100644 --- a/src/plugins/lists/LexicalListItemVisitor.ts +++ b/src/plugins/lists/LexicalListItemVisitor.ts @@ -10,8 +10,15 @@ export const LexicalListItemVisitor: LexicalExportVisitor