Aggiunto ckeditor-image-to-base

This commit is contained in:
Luca 2022-07-31 00:51:07 +02:00
parent f0880a0180
commit 54cb325435
5 changed files with 8 additions and 6 deletions

View File

@ -94,13 +94,14 @@ function initCKEditor(input) {
// Avvio di CKEditor // Avvio di CKEditor
CKEDITOR.replace(name, { CKEDITOR.replace(name, {
toolbar: (input.hasAttribute('use_full_ckeditor')) ? globals.ckeditorToolbar_Full : globals.ckeditorToolbar, toolbar: (input.hasAttribute('use_full_ckeditor')) ? globals.ckeditorToolbar_Full : globals.ckeditorToolbar,
language: globals.locale, language: (globals.locale) ? globals.locale : 'it',
scayt_autoStartup: true, scayt_autoStartup: true,
scayt_sLang: globals.full_locale, scayt_sLang: (globals.full_locale) ? globals.full_locale : 'it_IT',
scayt_disableOptionsStorage: 'lang',
disableNativeSpellChecker: false, disableNativeSpellChecker: false,
fullPage: (input.hasAttribute('use_full_ckeditor')) ? true : false, fullPage: (input.hasAttribute('use_full_ckeditor')) ? true : false,
allowedContent: (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', skin: 'moono-lisa',
}); });

View File

@ -18,7 +18,7 @@
*/ */
use Util\FileSystem; use Util\FileSystem;
$lang = '';
include_once __DIR__.'/../core.php'; include_once __DIR__.'/../core.php';
$paths = App::getPaths(); $paths = App::getPaths();

View File

@ -160,7 +160,7 @@ echo '
<div class="row"> <div class="row">
<div class="col-md-12"> <div class="col-md-12">
{[ "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).' ]}
</div> </div>
</div>'; </div>';

View File

@ -164,7 +164,7 @@ echo '
<div class="row"> <div class="row">
<div class="col-md-12"> <div class="col-md-12">
{[ "type": "ckeditor", "use_full_ckeditor": 0, "label": "<?php echo tr('Condizioni generali di fornitura'); ?>", "name": "condizioni_fornitura", "class": "autosize", "value": "$condizioni_fornitura$" ]} {[ "type": "ckeditor", "use_full_ckeditor": 1, "label": "<?php echo tr('Condizioni generali di fornitura'); ?>", "name": "condizioni_fornitura", "class": "autosize", "value": "$condizioni_fornitura$" ]}
</div> </div>
</div> </div>

View File

@ -12,6 +12,7 @@
"bootstrap-maxlength": "^1.10.1", "bootstrap-maxlength": "^1.10.1",
"chart.js": "^3.8.0", "chart.js": "^3.8.0",
"ckeditor4": "ckeditor/ckeditor-releases#full/latest", "ckeditor4": "ckeditor/ckeditor-releases#full/latest",
"ckeditor-image-to-base": "^0.0.3",
"components-jqueryui": "^1.12.1", "components-jqueryui": "^1.12.1",
"datatables.net-bs": "^1.10.15", "datatables.net-bs": "^1.10.15",
"datatables.net-buttons-bs": "^1.3.1", "datatables.net-buttons-bs": "^1.3.1",