Skip to content

Commit 241100b

Browse files
authored
Merge pull request #914 from SaadEddinHassania/master
TinyMCE 5, and Laravel 7
2 parents 2a1989f + 6a2c23c commit 241100b

File tree

2 files changed

+24
-7
lines changed

2 files changed

+24
-7
lines changed

composer.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,15 +23,15 @@
2323
}
2424
],
2525
"require": {
26-
"php": ">=5.4.0",
26+
"php": ">=7.2.0",
2727
"ext-exif": "*",
2828
"ext-fileinfo": "*",
2929
"intervention/image": "2.*",
30-
"illuminate/config": "5.4.* || 5.5.* || 5.6.* || 5.7.* || 5.8.* || ^6.0",
31-
"illuminate/filesystem": "5.4.* || 5.5.* || 5.6.* || 5.7.* || 5.8.* || ^6.0",
32-
"illuminate/support": "5.4.* || 5.5.* || 5.6.* || 5.7.* || 5.8.* || ^6.0",
33-
"illuminate/http": "5.4.* || 5.5.* || 5.6.* || 5.7.* || 5.8.* || ^6.0",
34-
"illuminate/container": "5.4.* || 5.5.* || 5.6.* || 5.7.* || 5.8.* || ^6.0"
30+
"illuminate/config": "5.4.* || 5.5.* || 5.6.* || 5.7.* || 5.8.* || ^6.0 || ^7.0",
31+
"illuminate/filesystem": "5.4.* || 5.5.* || 5.6.* || 5.7.* || 5.8.* || ^6.0 || ^7.0",
32+
"illuminate/support": "5.4.* || 5.5.* || 5.6.* || 5.7.* || 5.8.* || ^6.0 || ^7.0",
33+
"illuminate/http": "5.4.* || 5.5.* || 5.6.* || 5.7.* || 5.8.* || ^6.0 || ^7.0",
34+
"illuminate/container": "5.4.* || 5.5.* || 5.6.* || 5.7.* || 5.8.* || ^6.0 || ^7.0"
3535
},
3636
"require-dev": {
3737
"phpunit/phpunit": "^6.2",

public/js/script.js

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -558,6 +558,17 @@ function use(items) {
558558
}
559559
}
560560

561+
function useTinymce5(url){
562+
if (!usingTinymce5()) { return; }
563+
564+
parent.postMessage({
565+
mceAction: 'insert',
566+
content: url
567+
});
568+
569+
parent.postMessage({ mceAction: 'close' });
570+
}
571+
561572
function useCkeditor3(url) {
562573
if (!usingCkeditor3()) { return; }
563574

@@ -589,6 +600,8 @@ function use(items) {
589600

590601
useTinymce4AndColorbox(url);
591602

603+
useTinymce5(url);
604+
592605
useCkeditor3(url);
593606

594607
useFckeditor2(url);
@@ -626,6 +639,10 @@ function usingTinymce4AndColorbox() {
626639
return !!getUrlParam('field_name');
627640
}
628641

642+
function usingTinymce5(){
643+
return !!getUrlParam('editor');
644+
}
645+
629646
function usingCkeditor3() {
630647
return !!getUrlParam('CKEditor') || !!getUrlParam('CKEditorCleanUpFuncNum');
631648
}
@@ -635,7 +652,7 @@ function usingFckeditor2() {
635652
}
636653

637654
function usingWysiwygEditor() {
638-
return usingTinymce3() || usingTinymce4AndColorbox() || usingCkeditor3() || usingFckeditor2();
655+
return usingTinymce3() || usingTinymce4AndColorbox() || usingTinymce5() || usingCkeditor3() || usingFckeditor2();
639656
}
640657

641658
// ==================================

0 commit comments

Comments
 (0)