Skip to content

Commit cbc900b

Browse files
committed
fix: additional props pass
1 parent 32703fe commit cbc900b

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

src/MixInput.tsx

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,13 +30,16 @@ const MixInput = forwardRef((props: MixInputProps, ref: ForwardedRef<MixInputRef
3030
editorOptions,
3131
className,
3232
tagAttrs,
33+
ref: _ref,
3334
...restProps
3435
} = props
3536

3637
const editorRef = useRef<HTMLDivElement>(null)
3738

3839
const editor = useEditor({
39-
editorProps: { attributes: { class: `mix-input ${className}`, ...(restProps as any) } },
40+
editorProps: {
41+
attributes: { class: `mix-input ${className}` },
42+
},
4043
extensions: [
4144
Document,
4245
Paragraph.configure({
@@ -46,7 +49,7 @@ const MixInput = forwardRef((props: MixInputProps, ref: ForwardedRef<MixInputRef
4649
Placeholder.configure({ placeholder }),
4750
TagExtension.configure({
4851
tagClassName,
49-
attrs: { ...DEFAULT_TAG_ATTRS, ...tagAttrs},
52+
attrs: { ...DEFAULT_TAG_ATTRS, ...tagAttrs },
5053
}),
5154
],
5255
onUpdate: ({ editor }) => {
@@ -75,7 +78,7 @@ const MixInput = forwardRef((props: MixInputProps, ref: ForwardedRef<MixInputRef
7578
insertContent,
7679
}))
7780

78-
return <EditorContent editor={editor} innerRef={editorRef} />
81+
return <EditorContent editor={editor} innerRef={editorRef} {...restProps} />
7982
})
8083

8184
export default MixInput

0 commit comments

Comments
 (0)