From b38ea281cc96d783447d227c62a791b1d8eb1e31 Mon Sep 17 00:00:00 2001 From: Sinclair Chen Date: Wed, 31 Aug 2022 20:16:22 -0700 Subject: [PATCH] Show border around selected embeds --- web/components/editor.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/web/components/editor.tsx b/web/components/editor.tsx index d7836c34..9802385e 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(