mirror of
https://github.com/Shadowfita/docmost.git
synced 2025-11-21 12:11:02 +10:00
Table of Contents Component
MVP table of contents. Will add a component menu with style choices soon.
This commit is contained in:
@ -10,6 +10,7 @@ import {
|
||||
IconLetterY,
|
||||
IconList,
|
||||
IconListNumbers,
|
||||
IconListTree,
|
||||
IconMath,
|
||||
IconMathFunction,
|
||||
IconMovie,
|
||||
@ -96,6 +97,20 @@ const CommandGroups: SlashMenuGroupedItemsType = {
|
||||
.run();
|
||||
},
|
||||
},
|
||||
{
|
||||
title: "Table of Contents",
|
||||
description: "Create a table of contents.",
|
||||
searchTerms: ["table", "contents", "list"],
|
||||
icon: IconListTree,
|
||||
command: ({ editor, range }: CommandProps) => {
|
||||
editor
|
||||
.chain()
|
||||
.focus()
|
||||
.deleteRange(range)
|
||||
.toggleTableOfContents()
|
||||
.run();
|
||||
},
|
||||
},
|
||||
{
|
||||
title: "Bullet list",
|
||||
description: "Create a simple bullet list.",
|
||||
|
||||
Reference in New Issue
Block a user