if (data.languageId !== languageId) {
const values = _values.get(elementId);
if (data.languageId) {
+ const beforeSelect = data.callbacks.get("beforeSelect");
+ if (beforeSelect) {
+ beforeSelect(data.element);
+ }
values.set(data.languageId, data.element.value);
}
if (languageId === 0) {
LanguageInput.init(elementId, values, availableLanguages, forceSelection);
LanguageInput.registerCallback(elementId, "select", callbackSelect);
LanguageInput.registerCallback(elementId, "submit", callbackSubmit);
+ // CKEditor does not permanently mirror the contents to the <textarea>.
+ LanguageInput.registerCallback(elementId, "beforeSelect", callbackSubmit);
}
exports.init = init;
});