Docs/toc undo fix (#2484)

* Update Component.jsx

Added `transaction.setMeta("addToHistory", false)` to fix undo bug when deleting headings

* Update Component.vue

Added `transaction.setMeta("addToHistory", false)` to fix undo bug when deleting headings
This commit is contained in:
Codemzy
2022-02-06 10:33:30 +00:00
committed by GitHub
parent 886cd339b9
commit 54b6c395cd
2 changed files with 2 additions and 0 deletions

View File

@@ -28,6 +28,7 @@ export default ({ editor }) => {
} }
}) })
transaction.setMeta("addToHistory", false)
transaction.setMeta('preventUpdate', true) transaction.setMeta('preventUpdate', true)
editor.view.dispatch(transaction) editor.view.dispatch(transaction)

View File

@@ -55,6 +55,7 @@ export default {
} }
}) })
transaction.setMeta("addToHistory", false)
transaction.setMeta('preventUpdate', true) transaction.setMeta('preventUpdate', true)
this.editor.view.dispatch(transaction) this.editor.view.dispatch(transaction)