From 138fe92b0fe67900c2a9d84e0cb70c9e84639f0a Mon Sep 17 00:00:00 2001 From: "SaadEddin A. Hassania" Date: Sat, 4 Apr 2020 01:17:25 +0300 Subject: [PATCH 1/2] TinyMCE 5, and Laravel 7 --- composer.json | 10 +++++----- public/js/script.js | 19 ++++++++++++++++++- 2 files changed, 23 insertions(+), 6 deletions(-) diff --git a/composer.json b/composer.json index 7d392c1a..3c52c7ad 100644 --- a/composer.json +++ b/composer.json @@ -27,11 +27,11 @@ "ext-exif": "*", "ext-fileinfo": "*", "intervention/image": "2.*", - "illuminate/config": "5.4.* || 5.5.* || 5.6.* || 5.7.* || 5.8.* || ^6.0", - "illuminate/filesystem": "5.4.* || 5.5.* || 5.6.* || 5.7.* || 5.8.* || ^6.0", - "illuminate/support": "5.4.* || 5.5.* || 5.6.* || 5.7.* || 5.8.* || ^6.0", - "illuminate/http": "5.4.* || 5.5.* || 5.6.* || 5.7.* || 5.8.* || ^6.0", - "illuminate/container": "5.4.* || 5.5.* || 5.6.* || 5.7.* || 5.8.* || ^6.0" + "illuminate/config": "5.4.* || 5.5.* || 5.6.* || 5.7.* || 5.8.* || ^6.0 || ^7.0", + "illuminate/filesystem": "5.4.* || 5.5.* || 5.6.* || 5.7.* || 5.8.* || ^6.0 || ^7.0", + "illuminate/support": "5.4.* || 5.5.* || 5.6.* || 5.7.* || 5.8.* || ^6.0 || ^7.0", + "illuminate/http": "5.4.* || 5.5.* || 5.6.* || 5.7.* || 5.8.* || ^6.0 || ^7.0", + "illuminate/container": "5.4.* || 5.5.* || 5.6.* || 5.7.* || 5.8.* || ^6.0 || ^7.0" }, "require-dev": { "phpunit/phpunit": "^6.2", diff --git a/public/js/script.js b/public/js/script.js index 9bf94b8c..d9c1ceec 100644 --- a/public/js/script.js +++ b/public/js/script.js @@ -558,6 +558,17 @@ function use(items) { } } + function useTinymce5(url){ + if (!usingTinymce5()) { return; } + + parent.postMessage({ + mceAction: 'insert', + content: url + }); + + parent.postMessage({ mceAction: 'close' }); + } + function useCkeditor3(url) { if (!usingCkeditor3()) { return; } @@ -589,6 +600,8 @@ function use(items) { useTinymce4AndColorbox(url); + useTinymce5(url); + useCkeditor3(url); useFckeditor2(url); @@ -626,6 +639,10 @@ function usingTinymce4AndColorbox() { return !!getUrlParam('field_name'); } +function usingTinymce5(){ + return !!getUrlParam('editor'); +} + function usingCkeditor3() { return !!getUrlParam('CKEditor') || !!getUrlParam('CKEditorCleanUpFuncNum'); } @@ -635,7 +652,7 @@ function usingFckeditor2() { } function usingWysiwygEditor() { - return usingTinymce3() || usingTinymce4AndColorbox() || usingCkeditor3() || usingFckeditor2(); + return usingTinymce3() || usingTinymce4AndColorbox() || usingTinymce5() || usingCkeditor3() || usingFckeditor2(); } // ================================== From 6a2c23c2c2c035197383360c57328052a42e3702 Mon Sep 17 00:00:00 2001 From: "SaadEddin A. Hassania" Date: Sat, 4 Apr 2020 18:06:23 +0300 Subject: [PATCH 2/2] set required php version to 7.2 --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 3c52c7ad..22aba5f4 100644 --- a/composer.json +++ b/composer.json @@ -23,7 +23,7 @@ } ], "require": { - "php": ">=5.4.0", + "php": ">=7.2.0", "ext-exif": "*", "ext-fileinfo": "*", "intervention/image": "2.*",