diff --git a/memento-note/components/rich-text-editor.tsx b/memento-note/components/rich-text-editor.tsx index c29080d..e253f28 100644 --- a/memento-note/components/rich-text-editor.tsx +++ b/memento-note/components/rich-text-editor.tsx @@ -295,7 +295,17 @@ export const RichTextEditor = forwardRefbar\nTitle\nlabel: value + const chartContent = markdown + .replace(/```chart\n?/gi, '') + .replace(/```$/gi, '') + .trim() + + const htmlContent = `
${chartContent}
` + + // Insert the chart HTML at current position const { from } = editor.state.selection // Check if we're in the middle of text, if so create a new paragraph @@ -311,8 +321,8 @@ export const RichTextEditor = forwardRef