mirror of
https://github.com/docmost/docmost.git
synced 2025-11-15 22:41:09 +10:00
feat: mermaid diagram integration (#202)
This commit is contained in:
@ -7,6 +7,7 @@ import {
|
||||
IconH2,
|
||||
IconH3,
|
||||
IconInfoCircle,
|
||||
IconLetterY,
|
||||
IconList,
|
||||
IconListNumbers,
|
||||
IconMath,
|
||||
@ -253,6 +254,19 @@ const CommandGroups: SlashMenuGroupedItemsType = {
|
||||
command: ({ editor, range }: CommandProps) =>
|
||||
editor.chain().focus().deleteRange(range).setMathBlock().run(),
|
||||
},
|
||||
{
|
||||
title: "Mermaid diagram",
|
||||
description: "Insert mermaid diagram",
|
||||
searchTerms: ["mermaid", "diagram", "chart"],
|
||||
icon: IconLetterY,
|
||||
command: ({ editor, range }: CommandProps) =>
|
||||
editor
|
||||
.chain()
|
||||
.focus()
|
||||
.deleteRange(range)
|
||||
.setCodeBlock({ language: "mermaid" })
|
||||
.run(),
|
||||
},
|
||||
],
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user