mirror of
https://github.com/AmruthPillai/Reactive-Resume.git
synced 2025-11-10 04:22:27 +10:00
Fix: Can't insert image in a category other than summary
This commit is contained in:
@ -85,7 +85,12 @@ const InsertImageForm = ({ onInsert }: InsertImageProps) => {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<Form {...form}>
|
<Form {...form}>
|
||||||
<form className="space-y-3" onSubmit={form.handleSubmit(onSubmit)}>
|
<form className="space-y-3"
|
||||||
|
onSubmit={(e) => {
|
||||||
|
e.stopPropagation();
|
||||||
|
e.preventDefault();
|
||||||
|
form.handleSubmit(onSubmit)();
|
||||||
|
}}>
|
||||||
<p className="prose prose-sm prose-zinc dark:prose-invert">
|
<p className="prose prose-sm prose-zinc dark:prose-invert">
|
||||||
Insert an image from an external URL and use it on your resume.
|
Insert an image from an external URL and use it on your resume.
|
||||||
</p>
|
</p>
|
||||||
@ -384,6 +389,7 @@ const Toolbar = ({ editor }: { editor: Editor }) => {
|
|||||||
size="sm"
|
size="sm"
|
||||||
variant="ghost"
|
variant="ghost"
|
||||||
className="px-2"
|
className="px-2"
|
||||||
|
type="button"
|
||||||
disabled={!editor.can().chain().focus().setHardBreak().run()}
|
disabled={!editor.can().chain().focus().setHardBreak().run()}
|
||||||
onClick={() => editor.chain().focus().setHardBreak().run()}
|
onClick={() => editor.chain().focus().setHardBreak().run()}
|
||||||
>
|
>
|
||||||
@ -396,6 +402,7 @@ const Toolbar = ({ editor }: { editor: Editor }) => {
|
|||||||
size="sm"
|
size="sm"
|
||||||
variant="ghost"
|
variant="ghost"
|
||||||
className="px-2"
|
className="px-2"
|
||||||
|
type="button"
|
||||||
disabled={!editor.can().chain().focus().setHorizontalRule().run()}
|
disabled={!editor.can().chain().focus().setHorizontalRule().run()}
|
||||||
onClick={() => editor.chain().focus().setHorizontalRule().run()}
|
onClick={() => editor.chain().focus().setHorizontalRule().run()}
|
||||||
>
|
>
|
||||||
|
|||||||
Reference in New Issue
Block a user