diff --git a/app/code/Magento/MediaGalleryUi/view/adminhtml/web/js/grid/columns/image/insertImageAction.js b/app/code/Magento/MediaGalleryUi/view/adminhtml/web/js/grid/columns/image/insertImageAction.js index 0b5e9f7b3278e..e30e46327365c 100644 --- a/app/code/Magento/MediaGalleryUi/view/adminhtml/web/js/grid/columns/image/insertImageAction.js +++ b/app/code/Magento/MediaGalleryUi/view/adminhtml/web/js/grid/columns/image/insertImageAction.js @@ -49,7 +49,7 @@ define([ showLoader: true }).done($.proxy(function (data) { if (typeof targetElement === 'function') { - targetElement(data.content); + targetElement(data.content, {text: record['title']}); } else if (targetElement.is('textarea')) { this.insertAtCursor(targetElement.get(0), data.content); targetElement.focus(); diff --git a/lib/web/mage/adminhtml/browser.js b/lib/web/mage/adminhtml/browser.js index 148fc25f30dd0..6ebd035998b2d 100644 --- a/lib/web/mage/adminhtml/browser.js +++ b/lib/web/mage/adminhtml/browser.js @@ -307,7 +307,7 @@ define([ showLoader: true }).done($.proxy(function (data) { if (typeof targetEl === 'function') { - targetEl(data); + targetEl(data, {text: fileRow.find('img').attr('alt')}); } else if (targetEl.is('textarea')) { this.insertAtCursor(targetEl.get(0), data); } else {