mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
Support for thematic breaks
- Use the '-' character
This commit is contained in:
parent
ebb01c5e5b
commit
b71df1e46f
@ -10,6 +10,7 @@ import {
|
||||
InsertAdmonition,
|
||||
InsertImage,
|
||||
InsertTable,
|
||||
InsertThematicBreak,
|
||||
ListsToggle,
|
||||
MDXEditor,
|
||||
type MDXEditorMethods,
|
||||
@ -24,6 +25,7 @@ import {
|
||||
markdownShortcutPlugin,
|
||||
quotePlugin,
|
||||
tablePlugin,
|
||||
thematicBreakPlugin,
|
||||
toolbarPlugin
|
||||
} from '@mdxeditor/editor';
|
||||
import '@mdxeditor/editor/style.css';
|
||||
@ -186,7 +188,8 @@ export default function NotesEditor({
|
||||
listsPlugin(),
|
||||
markdownShortcutPlugin(),
|
||||
quotePlugin(),
|
||||
tablePlugin()
|
||||
tablePlugin(),
|
||||
thematicBreakPlugin()
|
||||
];
|
||||
|
||||
let toolbar: ReactNode[] = [];
|
||||
@ -225,7 +228,8 @@ export default function NotesEditor({
|
||||
<Separator key="separator-4" />,
|
||||
<CreateLink key="create-link" />,
|
||||
<InsertTable key="insert-table" />,
|
||||
<InsertAdmonition key="insert-admonition" />
|
||||
<InsertAdmonition key="insert-admonition" />,
|
||||
<InsertThematicBreak key="insert-thematic-break" />
|
||||
];
|
||||
}
|
||||
}
|
||||
@ -255,6 +259,14 @@ export default function NotesEditor({
|
||||
]);
|
||||
|
||||
return (
|
||||
<MDXEditor ref={ref} markdown={''} readOnly={!editable} plugins={plugins} />
|
||||
<MDXEditor
|
||||
ref={ref}
|
||||
markdown={''}
|
||||
readOnly={!editable}
|
||||
plugins={plugins}
|
||||
toMarkdownOptions={{
|
||||
rule: '-' // Use dashes for thematic breaks
|
||||
}}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user