Composer: Use link references only when composing HTML message

The link references do not make sense when composing Plain Text
messages, because the links are shown verbatim in the text.
This commit is contained in:
Milan Crha
2023-12-11 08:30:15 +01:00
parent 195904c59c
commit 47865392be
+3 -2
View File
@@ -2297,7 +2297,7 @@ EvoEditor.convertTags = function()
}
list = document.getElementsByTagName("A");
if (list.length > 0 && EvoEditor.LINK_TO_TEXT != EvoConvert.E_HTML_LINK_TO_TEXT_NONE) {
if (list.length > 0 && EvoEditor.LINK_TO_TEXT != EvoConvert.E_HTML_LINK_TO_TEXT_NONE && EvoEditor.mode == EvoEditor.MODE_HTML) {
var append_refs = [];
for (ii = 0; ii < list.length; ii++) {
var node = list[ii];
@@ -3071,7 +3071,8 @@ EvoEditor.GetContent = function(flags, cid_uid_prefix, default_css_style)
content_data["to-send-html"] = EvoEditor.convertHtmlToSend(default_css_style);
if ((flags & EvoEditor. E_CONTENT_EDITOR_GET_TO_SEND_PLAIN) != 0) {
content_data["to-send-plain"] = EvoConvert.ToPlainText(document.body, EvoEditor.NORMAL_PARAGRAPH_WIDTH, EvoEditor.LINK_TO_TEXT);
content_data["to-send-plain"] = EvoConvert.ToPlainText(document.body, EvoEditor.NORMAL_PARAGRAPH_WIDTH,
EvoEditor.mode == EvoEditor.MODE_HTML ? EvoEditor.LINK_TO_TEXT : EvoConvert.E_HTML_LINK_TO_TEXT_NONE);
}
} finally {
try {