Skip to content

Commit

Permalink
refactor(editor): optimize mark performance (#1104)
Browse files Browse the repository at this point in the history
  • Loading branch information
ocavue authored Jul 22, 2022
1 parent 3d3b033 commit 15dfc67
Show file tree
Hide file tree
Showing 9 changed files with 260 additions and 219 deletions.
7 changes: 0 additions & 7 deletions packages/editor/src/components/Editor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -80,13 +80,6 @@ const Editor: React.ForwardRefRenderFunction<EditorHandle, EditorProps> = (
return (params: RemirrorEventListenerProps<Extension>) => {
const { tr, firstRender } = params

// if (tr && tr.docChanged && !tr.getMeta("RINO_APPLY_MARKS")) {
// const prev = props.previousState.doc.toJSON()
// const curr = props.state.doc.toJSON()
// console.log("prev === curr:", prev === curr)
// console.log("EDIT_CONTENT diff:", diffObject(curr, prev))
// }

if (!firstRender && tr?.docChanged && !tr.getMeta("RINO_APPLY_MARKS")) {
editContent()
saveContentWithDelay()
Expand Down
Loading

0 comments on commit 15dfc67

Please sign in to comment.