From 54cb3254355c1b3d069ae2accd69e20332ab88ca Mon Sep 17 00:00:00 2001 From: Luca Date: Sun, 31 Jul 2022 00:51:07 +0200 Subject: [PATCH] Aggiunto ckeditor-image-to-base --- assets/src/js/functions/textarea.js | 7 ++++--- include/top.php | 2 +- mail.php | 2 +- modules/preventivi/edit.php | 2 +- package.json | 1 + 5 files changed, 8 insertions(+), 6 deletions(-) diff --git a/assets/src/js/functions/textarea.js b/assets/src/js/functions/textarea.js index 1681e0fb2..6220566e8 100644 --- a/assets/src/js/functions/textarea.js +++ b/assets/src/js/functions/textarea.js @@ -94,13 +94,14 @@ function initCKEditor(input) { // Avvio di CKEditor CKEDITOR.replace(name, { toolbar: (input.hasAttribute('use_full_ckeditor')) ? globals.ckeditorToolbar_Full : globals.ckeditorToolbar, - language: globals.locale, + language: (globals.locale) ? globals.locale : 'it', scayt_autoStartup: true, - scayt_sLang: globals.full_locale, + scayt_sLang: (globals.full_locale) ? globals.full_locale : 'it_IT', + scayt_disableOptionsStorage: 'lang', disableNativeSpellChecker: false, fullPage: (input.hasAttribute('use_full_ckeditor')) ? true : false, allowedContent: (input.hasAttribute('use_full_ckeditor')) ? true : false, - extraPlugins: 'scayt', + extraPlugins: 'scayt,ckeditor-image-to-base64', skin: 'moono-lisa', }); diff --git a/include/top.php b/include/top.php index 95feec39a..24737355b 100755 --- a/include/top.php +++ b/include/top.php @@ -18,7 +18,7 @@ */ use Util\FileSystem; -$lang = ''; + include_once __DIR__.'/../core.php'; $paths = App::getPaths(); diff --git a/mail.php b/mail.php index e88e5ab4a..3f72e6776 100755 --- a/mail.php +++ b/mail.php @@ -160,7 +160,7 @@ echo '
- {[ "type": "ckeditor", "label": "'.tr('Contenuto').'", "name": "body", "id": "body_'.rand(0, 999).'", "value": '.json_encode($body).' ]} + {[ "type": "ckeditor", "use_full_ckeditor": 1, "label": "'.tr('Contenuto').'", "name": "body", "id": "body_'.rand(0, 999).'", "value": '.json_encode($body).' ]}
'; diff --git a/modules/preventivi/edit.php b/modules/preventivi/edit.php index 6d9a11f1c..004774673 100755 --- a/modules/preventivi/edit.php +++ b/modules/preventivi/edit.php @@ -164,7 +164,7 @@ echo '
- {[ "type": "ckeditor", "use_full_ckeditor": 0, "label": "", "name": "condizioni_fornitura", "class": "autosize", "value": "$condizioni_fornitura$" ]} + {[ "type": "ckeditor", "use_full_ckeditor": 1, "label": "", "name": "condizioni_fornitura", "class": "autosize", "value": "$condizioni_fornitura$" ]}
diff --git a/package.json b/package.json index 4e36af256..9b860dc62 100755 --- a/package.json +++ b/package.json @@ -12,6 +12,7 @@ "bootstrap-maxlength": "^1.10.1", "chart.js": "^3.8.0", "ckeditor4": "ckeditor/ckeditor-releases#full/latest", + "ckeditor-image-to-base": "^0.0.3", "components-jqueryui": "^1.12.1", "datatables.net-bs": "^1.10.15", "datatables.net-buttons-bs": "^1.3.1",