From 93778762c15c2c2e6e10ce9151ee3231ee7079e4 Mon Sep 17 00:00:00 2001 From: Sinclair Chen Date: Tue, 27 Sep 2022 18:04:44 -0400 Subject: [PATCH] Add spoiler button to format menu --- web/components/editor.tsx | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/web/components/editor.tsx b/web/components/editor.tsx index fcdda63f..5050a261 100644 --- a/web/components/editor.tsx +++ b/web/components/editor.tsx @@ -29,6 +29,7 @@ import { EmbedModal } from './editor/embed-modal' import { CheckIcon, CodeIcon, + EyeOffIcon, PhotographIcon, PresentationChartLineIcon, TrashIcon, @@ -170,6 +171,7 @@ function FloatingMenu(props: { editor: Editor | null }) { const isBold = editor.isActive('bold') const isItalic = editor.isActive('italic') const isLink = editor.isActive('link') + const isSpoiler = editor.isActive('spoiler') const setLink = () => { const href = url && getUrl(url) @@ -198,6 +200,11 @@ function FloatingMenu(props: { editor: Editor | null }) { + ) : ( <>