mirror of
https://github.com/ianstormtaylor/slate.git
synced 2025-08-15 19:54:02 +02:00
Fix deprecated editor.change in after/onCut (#2343)
This commit is contained in:
committed by
Ian Storm Taylor
parent
8271cecc1e
commit
43812193ea
@@ -226,11 +226,11 @@ function AfterPlugin(options = {}) {
|
||||
const isVoidInline = endInline && editor.isVoid(endInline) && isCollapsed
|
||||
|
||||
if (isVoidBlock) {
|
||||
editor.editor(c => c.removeNodeByKey(endBlock.key))
|
||||
editor.removeNodeByKey(endBlock.key)
|
||||
} else if (isVoidInline) {
|
||||
editor.editor(c => c.removeNodeByKey(endInline.key))
|
||||
editor.removeNodeByKey(endInline.key)
|
||||
} else {
|
||||
editor.editor(c => c.delete())
|
||||
editor.delete()
|
||||
}
|
||||
})
|
||||
|
||||
|
Reference in New Issue
Block a user