[BUGFIX] Make ckeditor link browser not drop CSS-Classes if editing again 87/57387/2
authorFrédéric Lebel <flebel@opval.com>
Wed, 27 Jun 2018 02:57:49 +0000 (02:57 +0000)
committerChristian Kuhn <lolli@schwarzbu.ch>
Mon, 2 Jul 2018 10:18:50 +0000 (12:18 +0200)
Fix the link browser to not drop the CSS-Class value with multiple classes
if editing the same link.

Resolves: #85182
Releases: master, 8.7
Change-Id: Id7819f25c6a456c379de406816e44d7d1d76157e
Reviewed-on: https://review.typo3.org/57387
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Joerg Boesche <typo3@joergboesche.de>
Reviewed-by: Benni Mack <benni@typo3.org>
Tested-by: Benni Mack <benni@typo3.org>
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
typo3/sysext/rte_ckeditor/Classes/Controller/BrowseLinksController.php

index c51c9ac..fd8d7a7 100644 (file)
@@ -178,14 +178,6 @@ class BrowseLinksController extends AbstractLinkBrowserController
             }
         }
 
-        if (!empty($this->currentLinkParts['class'])) {
-            // Only keep last class value (others are automatically added again by required option)
-            // https://review.typo3.org/#/c/29643
-            $currentClasses = GeneralUtility::trimExplode(' ', $this->currentLinkParts['class'], true);
-            if (count($currentClasses) > 1) {
-                $this->currentLinkParts['class'] = end($currentClasses);
-            }
-        }
         parent::initCurrentUrl();
     }