Bug #88302
closedCKEditor language plugin not loadable, crash
100%
Description
I use TYPO3 version 8.7.25. My YAML configuration file for CKEditor works fine in general, so there is no problem with not accepting my configuration in general. But:
editor: externalPlugins: language: { resource: "EXT:rte_ckeditor/Resources/Public/JavaScript/Contrib/plugins/language/" }
This crashes the RTE.
Browser console says: "TypeError: e.toLowerCase is not a function > ckeditor.js:244:345"
The results of my investigation so far:
sysext/rte_ckeditor/Resources/Public/JavaScript/Contrib/ckeditor.js has this method:
load:function(a,e,b){a&&CKEDITOR.lang.languages[a]||(a=this.detect(e,a));
if "a" is not present, the detect method is executed:
detect:function(a,e){var b=this.languages;e=e||navigator.userLanguage||navigator.language||a;var c=e.toLowerCase()...
This variable "a" is "languageCode" in the original code from https://github.com/ckeditor/ckeditor-dev/blob/major/core/lang.js
So, back to sysext/rte_ckeditor/Resources/Public/JavaScript/Contrib/ckeditor.js, we find
CKEDITOR.lang.load(a.config.language
But config.language is empty. Setting this in YAML has no effect:
editor: config: language: "de"
The only thing that works is manipulation of ckeditor.js itself, by chaning the line above to (and thus skipping detection):
load:function(a,e,b){a&&CKEDITOR.lang.languages[a]||(a="de");
Files