This commit is contained in:
Kiyoka Nishiyama 2024-06-12 20:32:08 +00:00 committed by GitHub
commit 83af2a655b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -169,6 +169,10 @@ const imageCtrl = ContentState => {
}
ContentState.prototype.deleteImage = function ({ key, token }) {
const { selectedImage } = this
if (selectedImage && (selectedImage.key === key)) {
this.selectedImage = null
}
const block = this.getBlock(key)
const oldText = block.text
const { start, end } = token.range