From bf574bd8000c8db8f575131328e3b6269ac46546 Mon Sep 17 00:00:00 2001 From: John Rayes Date: Thu, 4 Mar 2021 21:27:50 -0700 Subject: [PATCH] Append a zero width space to inserted links Fixes #644 --- src/lib/defaultCommands.js | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/src/lib/defaultCommands.js b/src/lib/defaultCommands.js index 2365405c4..92d4204e9 100644 --- a/src/lib/defaultCommands.js +++ b/src/lib/defaultCommands.js @@ -544,11 +544,15 @@ var defaultCmds = { editor.wysiwygEditorInsertHtml( '' + - escape.entities((text || email)) + - '' + escape.entities(text || email) + + '​' ); } else { - editor.execCommand('createlink', 'mailto:' + email); + editor.wysiwygEditorInsertHtml( + '', + '​' + ); } } ); @@ -597,10 +601,13 @@ var defaultCmds = { editor.wysiwygEditorInsertHtml( '' + escape.entities(text || url) + - '' + '​' ); } else { - editor.execCommand('createlink', url); + editor.wysiwygEditorInsertHtml( + '', + '​' + ); } }); },