ckEditor: Text-Align "Center" not working
If one tries to center-align text in the ckEditor via the center-align-button, it does not work correctly.
Instead of adding the class "text-center" to the applied element, the class "text-left" is added (see appended screenshot).
All other options (text-left, text-right, text-justify) work properly.
Updated by Angelo Previtali almost 5 years ago
I can confirm a similar thing: If you edit a text with the EXT:ckeditor, you will mark a text and add "center" as alignement, the editor will correctly generate text-align=center but the icon still is on the initial alignement=left posision.
We use 8.7.3 with PHP 7.1
Updated by Ludwig Rafelsberger over 4 years ago
- File typo3-rte_ckeditor-wrong-stylesheet-path.png typo3-rte_ckeditor-wrong-stylesheet-path.png added
- File typo3-rte_ckeditor-inexistent-stylesheet-path.png typo3-rte_ckeditor-inexistent-stylesheet-path.png added
I can reproduce the issue, also getting
in the code view, but no visual clue and the left-align icon still active.
The mentioned file does not exist there:
Updated by Riccardo De Contardi over 4 years ago
I am using TYPO3 8.7.8 and I am still not able to reproduce the issue;
I also don't have missing files: the content.css file is in the folder rte_ckeditor/Resources/Public/Css/ - see attached file
Updated by Jan Stockfisch about 4 years ago
I can verify (TYPO3 8.7.10) the described problem from Angelo Previtali. Will open a new issue for that, scince it's different from the original topic and also test it on my TYPO3 v9 instance.
EDIT: The Issue is #84000 (also referenced above) and this also is in current master.
Updated by Riccardo De Contardi over 3 years ago
- Status changed from Needs Feedback to Closed
No feedback since the last 90 days => closing this issue; moreover the related issue has been closed by request of its author.
If you think that this is the wrong decision or experience the issue again and have more information about how to reproduce your problem, please reopen it or open a new issue with a reference to this one.
Thank you and best regards
Updated by Gerrit Hübbers 6 months ago
TYPO3 CKEditor's text alignment classes were changed in 2017, e.g. from
TYPO3 installations that already existed before this change may still have those outdated CSS classes flying around in their database, e.g. in
Example sQL query for checking on
align-center (sorted by creation date):
SELECT * FROM tt_content WHERE bodytext LIKE '%align-center%' AND t3_origuid = 0 and deleted = 0 AND hidden = 0 ORDER BY crdate desc;