From 7c1e663b264b05ed62aaf942e4df2f987d1c0fd1 Mon Sep 17 00:00:00 2001 From: Sinclair Chen Date: Wed, 31 Aug 2022 20:52:12 -0700 Subject: [PATCH] Editor tweaks (#829) * Show border around selected embeds * Make editor tooltips not animate --- web/components/editor.tsx | 10 ++++++---- web/components/tooltip.tsx | 9 +++++---- 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/web/components/editor.tsx b/web/components/editor.tsx index d7836c34..c15d17b1 100644 --- a/web/components/editor.tsx +++ b/web/components/editor.tsx @@ -73,7 +73,9 @@ export function useTextEditor(props: { const editorClass = clsx( proseClass, !simple && 'min-h-[6em]', - 'outline-none pt-2 px-4' + 'outline-none pt-2 px-4', + 'prose-img:select-auto', + '[&_.ProseMirror-selectednode]:outline-dotted [&_*]:outline-indigo-300' // selected img, emebeds ) const editor = useEditor( @@ -164,7 +166,7 @@ export function TextEditor(props: { {/* Toolbar, with buttons for images and embeds */}
- + - + - +