mirror of
https://github.com/docmost/docmost.git
synced 2025-11-15 14:11:10 +10:00
add HR divider to slash menu
This commit is contained in:
@ -7,7 +7,6 @@ import {
|
||||
IconH2,
|
||||
IconH3,
|
||||
IconInfoCircle,
|
||||
IconLetterY,
|
||||
IconList,
|
||||
IconListNumbers,
|
||||
IconMath,
|
||||
@ -17,6 +16,7 @@ import {
|
||||
IconPhoto,
|
||||
IconTable,
|
||||
IconTypography,
|
||||
IconMenu4
|
||||
} from "@tabler/icons-react";
|
||||
import {
|
||||
CommandProps,
|
||||
@ -124,12 +124,20 @@ const CommandGroups: SlashMenuGroupedItemsType = {
|
||||
},
|
||||
{
|
||||
title: "Code",
|
||||
description: "Capture a code snippet.",
|
||||
description: "Insert code snippet.",
|
||||
searchTerms: ["codeblock"],
|
||||
icon: IconCode,
|
||||
command: ({ editor, range }: CommandProps) =>
|
||||
editor.chain().focus().deleteRange(range).toggleCodeBlock().run(),
|
||||
},
|
||||
{
|
||||
title: "Divider",
|
||||
description: "Insert horizontal rule divider",
|
||||
searchTerms: ["horizontal rule", "hr"],
|
||||
icon: IconMenu4,
|
||||
command: ({ editor, range }: CommandProps) =>
|
||||
editor.chain().focus().deleteRange(range).setHorizontalRule().run(),
|
||||
},
|
||||
{
|
||||
title: "Image",
|
||||
description: "Upload any image from your device.",
|
||||
|
||||
Reference in New Issue
Block a user