@@ -94,8 +94,9 @@ function Editor(props) {
94
94
onChange,
95
95
} = props ;
96
96
97
- const editor = useMemo ( ( ) =>
98
- withReact ( withShortcodes ( withBlocks ( withLists ( withInlines ( createEditor ( ) ) ) ) ) ) , [ ]
97
+ const editor = useMemo (
98
+ ( ) => withReact ( withShortcodes ( withBlocks ( withLists ( withInlines ( createEditor ( ) ) ) ) ) ) ,
99
+ [ ] ,
99
100
) ;
100
101
101
102
const emptyValue = [ defaultEmptyBlock ( ) ] ;
@@ -175,15 +176,15 @@ function Editor(props) {
175
176
}
176
177
const [ toolbarKey , setToolbarKey ] = useState ( 0 ) ;
177
178
178
- const handleDocumentChange = debounce ( newValue => {
179
- setEditorValue ( ( ) => newValue ) ;
180
- onChange (
181
- slateToMarkdown ( newValue , {
182
- voidCodeBlock : ! ! codeBlockComponent ,
183
- remarkPlugins : getRemarkPlugins ( ) ,
184
- } ) ,
185
- ) ;
186
- } , 150 ) ;
179
+ // const handleDocumentChange = debounce(newValue => {
180
+ // setEditorValue(() => newValue);
181
+ // onChange(
182
+ // slateToMarkdown(newValue, {
183
+ // voidCodeBlock: !!codeBlockComponent,
184
+ // remarkPlugins: getRemarkPlugins(),
185
+ // }),
186
+ // );
187
+ // }, 150);
187
188
188
189
function handleChange ( newValue ) {
189
190
if ( ! isEqual ( newValue , editorValue ) ) {
0 commit comments