mirror of
https://github.com/ianstormtaylor/slate.git
synced 2025-08-16 12:14:14 +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
|
const isVoidInline = endInline && editor.isVoid(endInline) && isCollapsed
|
||||||
|
|
||||||
if (isVoidBlock) {
|
if (isVoidBlock) {
|
||||||
editor.editor(c => c.removeNodeByKey(endBlock.key))
|
editor.removeNodeByKey(endBlock.key)
|
||||||
} else if (isVoidInline) {
|
} else if (isVoidInline) {
|
||||||
editor.editor(c => c.removeNodeByKey(endInline.key))
|
editor.removeNodeByKey(endInline.key)
|
||||||
} else {
|
} else {
|
||||||
editor.editor(c => c.delete())
|
editor.delete()
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user