diff --git a/src/examples/jsx.tsx b/src/examples/jsx.tsx index 50676ee5..7d1de1e0 100644 --- a/src/examples/jsx.tsx +++ b/src/examples/jsx.tsx @@ -7,6 +7,7 @@ import { toolbarPlugin } from '../plugins/toolbar' import { Button } from '../plugins/toolbar/primitives/toolbar' import { NestedLexicalEditor } from '../plugins/core/NestedLexicalEditor' import { MdxJsxTextElement } from 'mdast-util-mdx' +import { headingsPlugin } from '..' const jsxComponentDescriptors: JsxComponentDescriptor[] = [ { @@ -99,3 +100,19 @@ export const Example = () => { /> ) } + +const markdown = ` +# Hello world + +
+ Content +
+` + +export const Html = () => { + return ( +
+ +
+ ) +} diff --git a/src/plugins/jsx/LexicalJsxVisitor.ts b/src/plugins/jsx/LexicalJsxVisitor.ts index 206be35d..05b0b169 100644 --- a/src/plugins/jsx/LexicalJsxVisitor.ts +++ b/src/plugins/jsx/LexicalJsxVisitor.ts @@ -22,5 +22,6 @@ export const LexicalJsxVisitor: LexicalExportVisitor = }, visitNode({ lexicalParent, mdastNode }) { ;(lexicalParent as ElementNode).append($createLexicalJsxNode(mdastNode)) - } + }, + priority: -200 }