el-text-editor 0.0.77 → 0.0.78

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -362,6 +362,13 @@ class ElTextEditorComponent {
362
362
  if (target.tagName === 'IMG') {
363
363
  this.selectedImage = target;
364
364
  this.imageEditUrl = this.selectedImage.src;
365
+ const images = editor.getElementsByTagName('img');
366
+ for (let i = 0; i < images.length; i++) {
367
+ if (images[i] === this.selectedImage) {
368
+ this.selectedItemIndex = i;
369
+ break;
370
+ }
371
+ }
365
372
  let container = this.selectedImage.parentElement;
366
373
  if (!container || container.className !== 'image-container') {
367
374
  container = document.createElement('div');