File tree Expand file tree Collapse file tree 1 file changed +12
-3
lines changed Expand file tree Collapse file tree 1 file changed +12
-3
lines changed Original file line number Diff line number Diff line change @@ -23,12 +23,16 @@ pimcore.bundle.tinymce.editor = Class.create({
23
23
} ,
24
24
25
25
initializeWysiwyg : function ( e ) {
26
+
26
27
if ( e . detail . context === 'object' ) {
27
28
if ( ! isNaN ( e . detail . config . maxCharacters ) && e . detail . config . maxCharacters > 0 ) {
28
29
this . maxChars = e . detail . config . maxCharacters ;
29
- } else {
30
+ } else {
30
31
this . maxChars = - 1 ;
31
32
}
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 ) ;
32
36
}
33
37
34
38
this . config = e . detail . config ;
@@ -59,7 +63,13 @@ pimcore.bundle.tinymce.editor = Class.create({
59
63
language = { } ;
60
64
}
61
65
62
- const toolbar1 = 'undo redo | blocks | ' +
66
+ let charCountPlugin = '' ;
67
+ if ( this . maxChars !== - 1 ) {
68
+ charCountPlugin = '| wordcount ' ;
69
+ }
70
+
71
+
72
+ const toolbar1 = `undo redo ${ charCountPlugin } | blocks | ` +
63
73
'bold italic | alignleft aligncenter ' +
64
74
'alignright alignjustify | link hr charmap' ;
65
75
@@ -114,7 +124,6 @@ pimcore.bundle.tinymce.editor = Class.create({
114
124
] ,
115
125
content_style : 'body { font-family:Helvetica,Arial,sans-serif; font-size:14px }' ,
116
126
inline : true ,
117
- ui_mode : 'split' ,
118
127
base_url : '/bundles/pimcoretinymce/build/tinymce' ,
119
128
suffix : '.min' ,
120
129
convert_urls : false ,
You can’t perform that action at this time.
0 commit comments