@@ -3,7 +3,6 @@ import React, { useImperativeHandle, useState, useRef } from "react";
3
3
import { useEditor , EditorContent } from "@tiptap/react" ;
4
4
import classnames from "classnames" ;
5
5
import { noop , slugify } from "neetocist" ;
6
- import { useFuncDebounce } from "neetocommons/react-utils" ;
7
6
import { Label } from "neetoui" ;
8
7
import { EditorView } from "prosemirror-view" ;
9
8
@@ -115,11 +114,6 @@ const Editor = (
115
114
} ) ;
116
115
useEditorWarnings ( { initialValue } ) ;
117
116
118
- const handleChange = useFuncDebounce (
119
- ( { editor } ) => onChange ( editor . getHTML ( ) ) ,
120
- 100
121
- ) ;
122
-
123
117
const editorClasses = classnames ( "neeto-editor" , {
124
118
"slash-active" : isSlashCommandsActive && ! isPlaceholderActive ,
125
119
"fixed-menu-active border" : isFixedMenuActive ,
@@ -155,7 +149,7 @@ const Editor = (
155
149
} ,
156
150
parseOptions : { preserveWhitespace : true } ,
157
151
onCreate : ( { editor } ) => ! autoFocus && setInitialPosition ( editor ) ,
158
- onUpdate : handleChange ,
152
+ onUpdate : ( { editor } ) => onChange ( editor . getHTML ( ) ) ,
159
153
onFocus,
160
154
onBlur,
161
155
} ) ;
0 commit comments