diff --git a/src/MarkdownEditor/editor/style.ts b/src/MarkdownEditor/editor/style.ts index 5af4853..61c068c 100644 --- a/src/MarkdownEditor/editor/style.ts +++ b/src/MarkdownEditor/editor/style.ts @@ -202,6 +202,14 @@ const genStyle: GenerateStyle = (token) => { '[data-be]:not(p)': { position: 'relative', }, + '[data-be="chart"]': { + marginTop: '0.5em', + marginBottom: '0.5em', + }, + '[data-be="card"]': { + marginTop: '0.5em', + marginBottom: '0.5em', + }, '& &-inline-code': { display: 'inline', backgroundColor: '#0000000f', diff --git a/src/MarkdownEditor/editor/tools/Leading.tsx b/src/MarkdownEditor/editor/tools/Leading.tsx index 7f47ad0..4f626ac 100644 --- a/src/MarkdownEditor/editor/tools/Leading.tsx +++ b/src/MarkdownEditor/editor/tools/Leading.tsx @@ -124,12 +124,13 @@ export const TocHeading = observer(({ note }: { note: IEditor }) => { }, [note]); useEffect(() => { + console.log('clear', note); cache.clear(); getHeading(); setState({ active: '' }); - }, [store?.container, note]); + }, [store?.container, note.schema]); - useDebounce(getHeading, 100, [note]); + useDebounce(getHeading, 100, [note.schema]); useEffect(() => { const div = box.current;