forked from github/plane
improved code structure for extracting props in Tiptap
This commit is contained in:
parent
96ef0a1e4f
commit
78a77cf560
@ -22,7 +22,20 @@ export interface ITiptapRichTextEditor {
|
||||
debouncedUpdatesEnabled?: boolean;
|
||||
}
|
||||
|
||||
const Tiptap = ({ onChange, debouncedUpdatesEnabled, forwardedRef, editable, setIsSubmitting, editorContentCustomClassNames, value, noBorder, borderOnFocus, customClassName }: ITiptapRichTextEditor) => {
|
||||
const Tiptap = (props: ITiptapRichTextEditor) => {
|
||||
const {
|
||||
onChange,
|
||||
debouncedUpdatesEnabled,
|
||||
forwardedRef,
|
||||
editable,
|
||||
setIsSubmitting,
|
||||
editorContentCustomClassNames,
|
||||
value,
|
||||
noBorder,
|
||||
borderOnFocus,
|
||||
customClassName
|
||||
} = props;
|
||||
|
||||
const editor = useEditor({
|
||||
editable: editable ?? true,
|
||||
editorProps: TiptapEditorProps,
|
||||
|
Loading…
Reference in New Issue
Block a user