Bug #81801
closedckEditor: Text-Align "Center" not working
0%
Description
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.
Files
Updated by Riccardo De Contardi over 7 years ago
- Status changed from New to Needs Feedback
Sorry, I am not able to reproduce it with both 8.7.3 and latest master. Could you give us more information about your setup? Is it a fresh TYPO3 install or do you use some extensions?
Updated by Angelo Previtali over 7 years ago
- File Screenshot_1.png Screenshot_1.png added
- File Screenshot_2.png Screenshot_2.png added
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 Riccardo De Contardi over 7 years ago
Still not able to reproduce the issue reported by @Angelo Previtali, but I am using PHP 7.0.15. I don't know if it is important.
Is there some javascript error somewhere?
Updated by Ludwig Rafelsberger about 7 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
<p class="align-center">…</p>
in the code view, but no visual clue and the left-align icon still active.
Is there some javascript error somewhere?
I do have a javascript-related error:
The mentioned file does not exist there:
Seems like a wrong path somewhere to me… The failing CSS load is initiated from a minified javascript (Contrib/ckeditor.js - sorry I am not javascript/frontend-fit enough to dig any further…)
Updated by Riccardo De Contardi about 7 years ago
- Status changed from Needs Feedback to New
Updated by Riccardo De Contardi about 7 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 Riccardo De Contardi almost 7 years ago
- Status changed from New to Needs Feedback
I've tested again with 8.7.9 and I am still not able to reproduce the issue.
Updated by Riccardo De Contardi almost 7 years ago
Not reproducible on 9.2.0-dev, too.
Updated by Jan Stockfisch over 6 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 Jan Stockfisch over 6 years ago
- Related to Bug #84000: Justify buttons are not displayed correctly while overriding justify-classes in custom RTE configuration added
Updated by Alexander Opitz over 6 years ago
So does this issue still exists or can the issue be closed?
Updated by Riccardo De Contardi about 6 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 almost 3 years ago
Noteworthy:
TYPO3 CKEditor's text alignment classes were changed in 2017, e.g. from .align-center
to .text-center
.
https://github.com/TYPO3-CMS/rte_ckeditor/commit/76ae7a714be53dc63446ded38527201a20c897dc
TYPO3 installations that already existed before this change may still have those outdated CSS classes flying around in their database, e.g. in tt_content.bodytext
.
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;