Actions
Bug #86240
closedrte link wizard selected class is not set if multiple classes
Status:
Closed
Priority:
Should have
Assignee:
-
Category:
RTE (rtehtmlarea + ckeditor)
Target version:
-
Start date:
2018-09-13
Due date:
% Done:
0%
Estimated time:
TYPO3 Version:
8
PHP Version:
Tags:
ckeditor, wizard, rte
Complexity:
Is Regression:
Sprint Focus:
On Location Sprint
Description
If in the ckeditor configuration file a class is added to the selectbox in the “link browser”, which contains more than one class, it will not be automatically selected in the “link browser”.
Screenshots: Steps to reproduce:
Screenshots: Steps to reproduce:
- Add the following lines to the ckeditor configuration file:
buttons:
link:
properties:
class:
allowedClasses:
- 'btn btn-braun'
- 'btn btn-weiss'
- 'btn btn-phone'
- 'btn btn-mail' - Open Typo3-Backend and create a new link in a content element.
- Select one of the classes in the “Link-Browser” and save.
- Open the link browser again and the previous selected class will not be automatically selected.
after some searching I identified the possible cause in file
TYPO3\CMS\RteCKEditor\Controller\BrowseLinksController line 185ff // 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); }
if we remove this line the select box is set to right value
Actions