Skip to content

Commit 0bdfe2f

Browse files
committed
feat: gestione attivazione/disattivazione correttore ortografico editor
1 parent db11eb7 commit 0bdfe2f

3 files changed

Lines changed: 10 additions & 1 deletion

File tree

assets/src/js/functions/textarea.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ function initCKEditor(input) {
110110
CKEDITOR.replace(name, {
111111
toolbar: (input.hasAttribute('use_full_ckeditor')) ? globals.ckeditorToolbar_Full : globals.ckeditorToolbar,
112112
language: globals.locale,
113-
scayt_autoStartup: true,
113+
scayt_autoStartup: globals.ckeditorSpellChecker,
114114
scayt_sLang: globals.full_locale,
115115
scayt_disableOptionsStorage: 'lang',
116116
disableNativeSpellChecker: false,

include/top.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -288,6 +288,7 @@
288288
openRouterApiKey: "'.setting('OpenRouter API Key').'",
289289
openRouterDefaultModel: "'.setting('Modello AI predefinito per OpenRouter').'",
290290
AISystemPrompt: "'.addslashes(setting('Prompt di sistema per Modello AI')).'",
291+
ckeditorSpellChecker: '.(((int) setting('Abilita correttore ortografico') == 1) ? 'true' : 'false').',
291292
};
292293
</script>';
293294
} else {

update/2_10.sql

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -425,3 +425,11 @@ INSERT INTO `zz_settings` (`nome`, `valore`, `tipo`, `editable`, `sezione`) VALU
425425
INSERT INTO `zz_settings_lang` (`id_lang`, `id_record`, `title`, `help`) VALUES
426426
(1, (SELECT MAX(`id`) FROM `zz_settings`), 'Nascondere il valore totale dei record delle tabelle', ''),
427427
(2, (SELECT MAX(`id`) FROM `zz_settings`), 'Hide total value of records in tables', '');
428+
429+
-- Abilita correttore ortografico CKEditor
430+
INSERT INTO `zz_settings` (`nome`, `valore`, `tipo`, `editable`, `sezione`) VALUES
431+
('Abilita correttore ortografico', '0', 'boolean', 1, 'Generali');
432+
433+
INSERT INTO `zz_settings_lang` (`id_lang`, `id_record`, `title`, `help`) VALUES
434+
(1, (SELECT MAX(`id`) FROM `zz_settings`), 'Abilita correttore ortografico', ''),
435+
(2, (SELECT MAX(`id`) FROM `zz_settings`), 'Enable spell checker', '');

0 commit comments

Comments
 (0)