Skip to content

Commit

Permalink
there is no alt text comming from com_media yet
Browse files Browse the repository at this point in the history
  • Loading branch information
zero-24 committed Sep 23, 2020
1 parent f4ff3bb commit 621171f
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,9 @@

if (Joomla.selectedFile.url) {
if (!isElement(editor) && (typeof editor !== 'object')) {
Joomla.editors.instances[editor].replaceSelection(`<img loading="lazy" src="${Joomla.selectedFile.url}" width="${Joomla.selectedFile.width}px" height="${Joomla.selectedFile.height}px" alt="${Joomla.selectedFile.alt}" />`);
Joomla.editors.instances[editor].replaceSelection(`<img loading="lazy" src="${Joomla.selectedFile.url}" width="${Joomla.selectedFile.width}px" height="${Joomla.selectedFile.height}px" alt="" />`);
} else if (!isElement(editor) && (typeof editor === 'object' && editor.id)) {
window.parent.Joomla.editors.instances[editor.id].replaceSelection(`<img loading="lazy" src="${Joomla.selectedFile.url}" width="${Joomla.selectedFile.width}px" height="${Joomla.selectedFile.height}px" alt="${Joomla.selectedFile.alt}" />`);
window.parent.Joomla.editors.instances[editor.id].replaceSelection(`<img loading="lazy" src="${Joomla.selectedFile.url}" width="${Joomla.selectedFile.width}px" height="${Joomla.selectedFile.height}px" alt="" />`);
} else {
editor.value = Joomla.selectedFile.url;
fieldClass.updatePreview();
Expand Down

0 comments on commit 621171f

Please sign in to comment.