feat(core): Update to ckeditor 5. Fixes #5920. Added disableNativeSpellChecker. Added htmlEmbed plugin.

This commit is contained in:
smizrahi
2024-03-04 15:07:52 +01:00
parent cc061582f4
commit 2b23ff3eb8
56 changed files with 83 additions and 91 deletions
@@ -228,17 +228,6 @@
config = vm.config ? angular.merge(sgCkeditorConfig.config, vm.config) : sgCkeditorConfig.config;
if (config.language) {
// Pickup the first matching language supported by SCAYT
// See http://docs.ckeditor.com/#!/guide/dev_howtos_scayt
config.scayt_sLang = _.find(['en_US', 'en_GB', 'pt_BR', 'da_DK', 'nl_NL', 'en_CA', 'fi_FI', 'fr_FR', 'fr_CA', 'de_DE', 'el_GR', 'it_IT', 'nb_NO', 'pt_PT', 'es_ES', 'sv_SE'], function (sLang) {
return sLang.lastIndexOf(config.language, 0) == 0;
}) || 'en_US';
// Disable caching of the language
// See https://github.com/WebSpellChecker/ckeditor-plugin-scayt/issues/126
config.scayt_disableOptionsStorage = 'lang';
}
if (!config.toolbar) {
config.toolbar = {
"items": [
@@ -250,7 +239,7 @@
"alignment", "|",
"link", "|",
"insertTable", "specialCharacters", "imageUpload", "|",
"undo", "redo", "sourceEditing"
"undo", "redo", "sourceEditing", "htmlEmbed"
],
"shouldNotGroupWhenFull": true
}
@@ -261,6 +250,7 @@
type: "inline"
}
};
config.disableNativeSpellChecker = false;
vm.config = config;
};