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.
|screenshot.jpg (54.8 KB) screenshot.jpg||Screenshot||Gute Botschafter, 2017-07-05 14:14|
|Screenshot_1.png (9.71 KB) Screenshot_1.png||Angelo Previtali, 2017-07-13 09:27|
|Screenshot_2.png (9.29 KB) Screenshot_2.png||Angelo Previtali, 2017-07-13 09:27|
|typo3-rte_ckeditor-wrong-stylesheet-path.png (105 KB) typo3-rte_ckeditor-wrong-stylesheet-path.png||Ludwig Rafelsberger, 2017-10-03 18:11|
|typo3-rte_ckeditor-inexistent-stylesheet-path.png (35.4 KB) typo3-rte_ckeditor-inexistent-stylesheet-path.png||Ludwig Rafelsberger, 2017-10-03 18:17|
|Schermata 2017-10-25 alle 23.59.49.png (337 KB) Schermata 2017-10-25 alle 23.59.49.png||Riccardo De Contardi, 2017-10-26 00:02|
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;