From d1b30965b47a248018b5323df47cd79308ef0026 Mon Sep 17 00:00:00 2001 From: mrothauer Date: Mon, 12 Feb 2024 09:50:24 +0100 Subject: [PATCH] replace ckeditor with jodit --- .eslintrc.js | 5 +- config/app_config.php | 4 +- config/asset_compress.ini | 8 ++ config/elfinder/elfinder.html | 83 ---------------- devtools/npm-post-install.sh | 1 - plugins/Admin/templates/Knowledges/edit.php | 6 +- plugins/Admin/templates/Pages/edit.php | 6 +- plugins/Admin/templates/Posts/edit.php | 6 +- plugins/Admin/templates/layout/default.php | 3 - src/Controller/AppController.php | 6 +- templates/Workshops/edit.php | 6 +- .../{ckeditorEdit.php => editorEdit.php} | 5 +- templates/element/post.php | 4 +- templates/layout/default.php | 3 - webroot/css/frontend.css | 55 ++++++++--- webroot/css/mobile-frontend.css | 4 +- .../js/ckeditor/config-without-elfinder.js | 46 --------- webroot/js/ckeditor/config.js | 49 ---------- webroot/js/editor.js | 95 +++++++++++++++++++ webroot/js/helper.js | 48 ---------- webroot/js/modal-elfinder.js | 2 + webroot/package-lock.json | 42 +++++--- webroot/package.json | 2 +- 23 files changed, 208 insertions(+), 281 deletions(-) delete mode 100644 config/elfinder/elfinder.html rename templates/element/{ckeditorEdit.php => editorEdit.php} (74%) delete mode 100644 webroot/js/ckeditor/config-without-elfinder.js delete mode 100644 webroot/js/ckeditor/config.js create mode 100644 webroot/js/editor.js create mode 100644 webroot/js/modal-elfinder.js diff --git a/.eslintrc.js b/.eslintrc.js index 8a102dd5a..50fbb523c 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -4,12 +4,15 @@ module.exports = { "jquery": true, "es6": true }, + "parserOptions": { + "ecmaVersion": 2020 + }, "ignorePatterns": ["webroot/js/elFinder/"], "globals": { "Chart": true, "ChartDataLabels": true, - "CKEDITOR": true, "ClipboardJS": true, + "Jodit": true, "MappedRepairEvents": true, "PruneCluster": true, "PruneClusterForLeaflet": true, diff --git a/config/app_config.php b/config/app_config.php index c65309a91..0d8d7094e 100644 --- a/config/app_config.php +++ b/config/app_config.php @@ -18,8 +18,8 @@ define('CACHE_PERSISTENT_DIR', CACHE_DIR . 'persistent/'); define('CACHE_VIEWS_DIR', CACHE_DIR . 'views/'); -define('ALLOWED_TAGS_CKEDITOR_USER', '



  • '); -define('ALLOWED_TAGS_CKEDITOR_ADMIN', ALLOWED_TAGS_CKEDITOR_USER . '