From 7e9cacd19b6ec60a94ddb9204ca6bc2a50f31b76 Mon Sep 17 00:00:00 2001 From: Sebastian Klein <sebastian@sklein-medien.de> Date: Thu, 11 Jul 2019 20:22:58 +0200 Subject: [PATCH] [BUGFIX] Prevent separating HTML inline elements The softhyphen button in RTE CKEditor separates HTML inline elements. If the softhyphen is inserted inside a link, it results in two individual links with the ­ entity between. This can already be examined in the source view of the RTE. Furthermore, a ­ entity between two HTML tags will prevent the browser to insert a hyphen at the position of the linebreak. Setting the optional mode 'text' to the insertHtml event will prevent this behaviour, as the inserted content will then inherit the styles which are applied in the selected position. Resolves: #88727 Releases: master, 9.5, 8.7 Change-Id: I4a398b02aba306016da12f290dab958b2e9ccf2c Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/61251 Tested-by: TYPO3com <noreply@typo3.com> Tested-by: Michael Telgkamp <michael.telgkamp@mindscreen.de> Tested-by: Susanne Moog <look@susi.dev> Reviewed-by: Michael Telgkamp <michael.telgkamp@mindscreen.de> Reviewed-by: Oliver Bartsch <bo@cedev.de> Reviewed-by: Henning Liebe <h.liebe@neusta.de> Reviewed-by: Felix P. <f.pachowsky@neusta.de> Reviewed-by: Susanne Moog <look@susi.dev> --- .../Resources/Public/JavaScript/Plugins/softhyphen/plugin.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/typo3/sysext/rte_ckeditor/Resources/Public/JavaScript/Plugins/softhyphen/plugin.js b/typo3/sysext/rte_ckeditor/Resources/Public/JavaScript/Plugins/softhyphen/plugin.js index f5b43daf2450..ecb14b3cdcfb 100644 --- a/typo3/sysext/rte_ckeditor/Resources/Public/JavaScript/Plugins/softhyphen/plugin.js +++ b/typo3/sysext/rte_ckeditor/Resources/Public/JavaScript/Plugins/softhyphen/plugin.js @@ -16,7 +16,7 @@ CKEDITOR.plugins.add("softhyphen", { // create command "insertSoftHyphen" which inserts the invisible html tag `­` editor.addCommand('insertSoftHyphen', { exec: function (editor) { - editor.insertHtml('­'); + editor.insertHtml('­', 'text'); } }); -- GitLab