Commit 7e9cacd1 authored by Sebastian Klein's avatar Sebastian Klein Committed by Susanne Moog
Browse files

[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: default avatarTYPO3com <noreply@typo3.com>
Tested-by: Michael Telgkamp's avatarMichael Telgkamp <michael.telgkamp@mindscreen.de>
Tested-by: Susanne Moog's avatarSusanne Moog <look@susi.dev>
Reviewed-by: Michael Telgkamp's avatarMichael Telgkamp <michael.telgkamp@mindscreen.de>
Reviewed-by: Oliver Bartsch's avatarOliver Bartsch <bo@cedev.de>
Reviewed-by: Henning Liebe's avatarHenning Liebe <h.liebe@neusta.de>
Reviewed-by: default avatarFelix P. <f.pachowsky@neusta.de>
Reviewed-by: Susanne Moog's avatarSusanne Moog <look@susi.dev>
parent bb304489
......@@ -16,7 +16,7 @@ CKEDITOR.plugins.add("softhyphen", {
// create command "insertSoftHyphen" which inserts the invisible html tag `&shy;`
editor.addCommand('insertSoftHyphen', {
exec: function (editor) {
editor.insertHtml('&shy;');
editor.insertHtml('&shy;', 'text');
}
});
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment