Jump to content

Moritz

Members
  • Posts

    2
  • Joined

  • Last visited

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

Moritz's Achievements

Newbie

Newbie (2/6)

0

Reputation

  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...