Skip to content

Commit 821ba80

Browse files
kingjia90robertSt7
andauthored
[Bug]: Apply ui-mode split only on documents (#11)
* apply only on documents * Apply suggestions from code review Co-authored-by: robertSt7 <[email protected]> --------- Co-authored-by: robertSt7 <[email protected]>
1 parent 4f31a92 commit 821ba80

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

public/js/editor.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,16 @@ pimcore.bundle.tinymce.editor = Class.create({
2323
},
2424

2525
initializeWysiwyg: function (e) {
26+
2627
if (e.detail.context === 'object') {
2728
if (!isNaN(e.detail.config.maxCharacters) && e.detail.config.maxCharacters > 0) {
2829
this.maxChars = e.detail.config.maxCharacters;
29-
}else{
30+
} else {
3031
this.maxChars = -1;
3132
}
33+
e.detail.config = Object.assign({}, {ui_mode: 'combined'}, e.detail.config);
34+
} else {
35+
e.detail.config = Object.assign({}, {ui_mode: 'split'}, e.detail.config);
3236
}
3337

3438
this.config = e.detail.config;
@@ -114,7 +118,6 @@ pimcore.bundle.tinymce.editor = Class.create({
114118
],
115119
content_style: 'body { font-family:Helvetica,Arial,sans-serif; font-size:14px }',
116120
inline: true,
117-
ui_mode: 'split',
118121
base_url: '/bundles/pimcoretinymce/build/tinymce',
119122
suffix: '.min',
120123
convert_urls: false,

0 commit comments

Comments
 (0)