feat: Add date and time slash commands to block menu

This commit is contained in:
Tom Moor
2022-04-07 18:50:50 -07:00
parent 63ed015a86
commit 1f93027c97
5 changed files with 52 additions and 5 deletions

View File

@@ -16,6 +16,8 @@ import {
InfoIcon,
LinkIcon,
AttachmentIcon,
ClockIcon,
CalendarIcon,
} from "outline-icons";
import { MenuItem } from "@shared/editor/types";
import { Dictionary } from "~/hooks/useDictionary";
@@ -124,6 +126,24 @@ export default function blockMenuItems(dictionary: Dictionary): MenuItem[] {
keywords: "page print break line",
attrs: { markup: "***" },
},
{
name: "date",
title: dictionary.insertDate,
keywords: "clock",
icon: CalendarIcon,
},
{
name: "time",
title: dictionary.insertTime,
keywords: "clock",
icon: ClockIcon,
},
{
name: "datetime",
title: dictionary.insertDateTime,
keywords: "clock",
icon: CalendarIcon,
},
{
name: "separator",
},