mirror of
https://github.com/marktext/marktext.git
synced 2025-05-02 22:22:18 +08:00
Merge 75aed2beef
into 11c8cc1e19
This commit is contained in:
commit
83af2a655b
@ -169,6 +169,10 @@ const imageCtrl = ContentState => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
ContentState.prototype.deleteImage = function ({ key, token }) {
|
ContentState.prototype.deleteImage = function ({ key, token }) {
|
||||||
|
const { selectedImage } = this
|
||||||
|
if (selectedImage && (selectedImage.key === key)) {
|
||||||
|
this.selectedImage = null
|
||||||
|
}
|
||||||
const block = this.getBlock(key)
|
const block = this.getBlock(key)
|
||||||
const oldText = block.text
|
const oldText = block.text
|
||||||
const { start, end } = token.range
|
const { start, end } = token.range
|
||||||
|
Loading…
Reference in New Issue
Block a user