Issue Bug Closed

#97778contentsLangDirection is not set automatically for RTL languages

Philipp Kitzberger 06/15/22, 13:35 updated 10/04/22, 14:05

Description

When initializing CKEditor TYPO3 is generating a configuration array that contains contentsLanguage but not contentsLangDirection.

EXT:rte_ckeditor/Classes/Form/Element/RichTextElement.php:398

$configuration['contentsLanguage'] = $this->getLanguageIsoCodeOfContent();

For most languages that’s OK but not for Arabic which is RTL and the editor should be set to that mode. Otherwise the user needs to apply the dir-attribute to each and every paragraph manually if they wanna edit the texts in the intended way.

A fix could be determining the direction based on reading the languages dir parameter from the site config? Or simply hardcoding a list of the most common RTL languages (Arabic, Hebrew, …)

Reviews 4