diff --git a/src/components/editor/MentionEditor.tsx b/src/components/editor/MentionEditor.tsx index 7fadd8a..aa92bc1 100644 --- a/src/components/editor/MentionEditor.tsx +++ b/src/components/editor/MentionEditor.tsx @@ -820,8 +820,7 @@ export const MentionEditor = forwardRef< extensions, editorProps: { attributes: { - class: - "prose prose-sm max-w-none focus:outline-none min-h-[1.25rem] px-2 py-1 whitespace-nowrap text-sm", + class: "prose prose-sm max-w-none focus:outline-none text-sm", }, }, autofocus: autoFocus, @@ -887,12 +886,9 @@ export const MentionEditor = forwardRef< return (
- +
); }, diff --git a/src/index.css b/src/index.css index 9684d61..d6c47f4 100644 --- a/src/index.css +++ b/src/index.css @@ -281,7 +281,9 @@ body.animating-layout /* TipTap Editor Styles */ .ProseMirror { - min-height: 2rem; + min-height: 1.25rem; + line-height: 1.25rem; + position: relative; } .ProseMirror:focus { @@ -290,14 +292,16 @@ body.animating-layout .ProseMirror p { margin: 0; + line-height: 1.25rem; } .ProseMirror p.is-editor-empty:first-child::before { content: attr(data-placeholder); - float: left; color: hsl(var(--muted-foreground)); pointer-events: none; - height: 0; + position: absolute; + left: 0; + top: 0; } /* Mention styles */