Skip to content

Commit c1c7c60

Browse files
committed
adjust tiptap styling
1 parent c8549b2 commit c1c7c60

File tree

2 files changed

+13
-8
lines changed

2 files changed

+13
-8
lines changed

apps/web/app/(app)/automation/knowledge/KnowledgeForm.tsx

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,10 @@ export function KnowledgeForm({
4848
title: editingItem.title,
4949
content: editingItem.content,
5050
}
51-
: undefined,
51+
: {
52+
title: "How to draft replies",
53+
content: "",
54+
},
5255
});
5356

5457
const editorRef = useRef<TiptapHandle>(null);
@@ -101,12 +104,14 @@ export function KnowledgeForm({
101104
name="content"
102105
control={control}
103106
render={({ field }) => (
104-
<Tiptap
105-
ref={editorRef}
106-
initialContent={field.value ?? ""}
107-
className="mt-1"
108-
autofocus={false}
109-
/>
107+
<div className="max-h-[600px] overflow-y-auto">
108+
<Tiptap
109+
ref={editorRef}
110+
initialContent={field.value ?? ""}
111+
className="mt-1"
112+
autofocus={false}
113+
/>
114+
</div>
110115
)}
111116
/>
112117
{errors.content && (

apps/web/components/editor/Tiptap.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ export const Tiptap = forwardRef<
5353
editorProps: {
5454
attributes: {
5555
class: cn(
56-
"prose prose-sm sm:prose-base dark:prose-invert max-w-none focus:outline-none min-h-[120px] px-3 py-2",
56+
"px-3 py-2 max-w-none focus:outline-none min-h-[120px]",
5757
className,
5858
),
5959
},

0 commit comments

Comments
 (0)