Skip to content

Commit

Permalink
Merge pull request #914 from SaadEddinHassania/master
Browse files Browse the repository at this point in the history
TinyMCE 5, and Laravel 7
  • Loading branch information
streamtw authored Apr 17, 2020
2 parents 2a1989f + 6a2c23c commit 241100b
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 7 deletions.
12 changes: 6 additions & 6 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,15 @@
}
],
"require": {
"php": ">=5.4.0",
"php": ">=7.2.0",
"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",
Expand Down
19 changes: 18 additions & 1 deletion public/js/script.js
Original file line number Diff line number Diff line change
Expand Up @@ -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; }

Expand Down Expand Up @@ -589,6 +600,8 @@ function use(items) {

useTinymce4AndColorbox(url);

useTinymce5(url);

useCkeditor3(url);

useFckeditor2(url);
Expand Down Expand Up @@ -626,6 +639,10 @@ function usingTinymce4AndColorbox() {
return !!getUrlParam('field_name');
}

function usingTinymce5(){
return !!getUrlParam('editor');
}

function usingCkeditor3() {
return !!getUrlParam('CKEditor') || !!getUrlParam('CKEditorCleanUpFuncNum');
}
Expand All @@ -635,7 +652,7 @@ function usingFckeditor2() {
}

function usingWysiwygEditor() {
return usingTinymce3() || usingTinymce4AndColorbox() || usingCkeditor3() || usingFckeditor2();
return usingTinymce3() || usingTinymce4AndColorbox() || usingTinymce5() || usingCkeditor3() || usingFckeditor2();
}

// ==================================
Expand Down

0 comments on commit 241100b

Please sign in to comment.