mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-09-02 22:17:03 +03:00
Release fixes
This commit is contained in:
parent
5e31c01344
commit
9a98bff931
30 changed files with 143 additions and 76 deletions
21
vendors/ckeditor-plugins/signature/plugin.js
vendored
21
vendors/ckeditor-plugins/signature/plugin.js
vendored
|
|
@ -9,13 +9,26 @@ rl_signature_replacer = function (editor, sText, sSignature, bHtml, bInsertBefor
|
|||
;
|
||||
}
|
||||
|
||||
sText = sText.replace(/\u0002([\s\S]*)\u0002/gm, '');
|
||||
|
||||
var
|
||||
bEmptyText = '' === $.trim(sText),
|
||||
sP = '~~~~@~~~~',
|
||||
bEmptyText = false,
|
||||
sNewLine = (bHtml ? '<br />' : "\n")
|
||||
;
|
||||
|
||||
sText = sText.replace(/\u0002([\s\S]*)\u0002/gm, sP + '$1' + sP);
|
||||
|
||||
if (editor.__previos_signature)
|
||||
{
|
||||
sText = sText
|
||||
.replace(sP + editor.__previos_signature + sP, '')
|
||||
.replace(sP + editor.__previos_signature + sP, '')
|
||||
.replace(sP + editor.__previos_signature + sP, '')
|
||||
;
|
||||
}
|
||||
|
||||
sText = sText.replace(sP, '').replace(sP, '').replace(sP, '').replace(sP, '');
|
||||
|
||||
bEmptyText = '' === $.trim(sText);
|
||||
if (!bEmptyText && bHtml)
|
||||
{
|
||||
bEmptyText = '' !== $.trim(editor.__plainUtils.htmlToPlain(sText));
|
||||
|
|
@ -24,10 +37,12 @@ rl_signature_replacer = function (editor, sText, sSignature, bHtml, bInsertBefor
|
|||
if (bInsertBefore)
|
||||
{
|
||||
sText = "\u0002" + sSignature + (bEmptyText ? '' : sNewLine) + "\u0002" + sText;
|
||||
editor.__previos_signature = sSignature + (bEmptyText ? '' : sNewLine);
|
||||
}
|
||||
else
|
||||
{
|
||||
sText = sText + "\u0002" + (bEmptyText ? '' : sNewLine) + sSignature + "\u0002";
|
||||
editor.__previos_signature = (bEmptyText ? '' : sNewLine) + sSignature;
|
||||
}
|
||||
|
||||
if (!bHtml)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue