Jump to content

Moritz

Members
  • Posts

    2
  • Joined

  • Last visited

Everything posted by Moritz

  1. Oh, just noted that to make this work with frontend editing, you'll have to add replace the "const lang" line with the following line: const lang = ed.element.$.parentElement.getAttribute("data-language") || ed.element.$.parentElement.getAttribute("data-lang");
  2. So, as I just found this via Google, I'll dig out this thread to help others: You have to edit site/modules/InputfieldCKEditor/config.js and add the following section inside the CKEDITOR.editorConfig function: const languages = { 1010: "de_DE", 1012: "en_US", }; const t = setInterval(() => { const ed = Object.values(CKEDITOR.instances).filter(x => x.config === config)[0]; const lang = ed.element.$.parentElement.getAttribute("data-language"); if (!lang || !languages[lang]) return clearInterval(t); if (!ed.scayt) return; // wait until scayt is initialized clearInterval(t); ed.scayt.setLang(languages[lang]); }, 100); You can find out the language IDs by looking at the URL of your language configuration page - it ends with e.g. ?id=1012
×
×
  • Create New...