mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-08-29 12:09:20 +03:00
Improvements for #1846
This commit is contained in:
parent
8b5547104d
commit
66553a36da
2 changed files with 21 additions and 3 deletions
|
|
@ -970,7 +970,7 @@ export class ComposePopupView extends AbstractViewPopup {
|
|||
// https://github.com/the-djmaze/snappymail/issues/491
|
||||
tpl.innerHTML = oLastMessage.bodyAsHTML();
|
||||
tpl.content.querySelectorAll('img').forEach(img => {
|
||||
img.src || img.dataset.xSrcCid || img.dataset.xSrc || img.replaceWith(img.alt || img.title)
|
||||
img.src || img.dataset.xSrc || img.replaceWith(img.alt || img.title)
|
||||
});
|
||||
sText = tpl.innerHTML.trim();
|
||||
|
||||
|
|
@ -1514,6 +1514,15 @@ export class ComposePopupView extends AbstractViewPopup {
|
|||
isHtml = this.oEditor.isHtml();
|
||||
|
||||
if (isHtml) {
|
||||
tpl.innerHTML = Text;
|
||||
tpl.content.querySelectorAll('img').forEach(img => {
|
||||
if (img.dataset.xSrc) {
|
||||
img.src = img.dataset.xSrc;
|
||||
img.removeAttribute('data-x-src')
|
||||
}
|
||||
});
|
||||
Text = tpl.innerHTML.trim();
|
||||
|
||||
do {
|
||||
l = Text.length;
|
||||
Text = Text
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue