File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed
Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change 11<template >
2- <div :class =" {fullscreen:fullscreen}" class =" tinymce-container editor-container " >
2+ <div :class =" {fullscreen:fullscreen}" class =" tinymce-container" :style = " {width:containerWidth} " >
33 <textarea :id =" tinymceId" class =" tinymce-textarea" />
44 <div class =" editor-custom-btn-container" >
55 <editorImage color =" #1890ff" class =" editor-upload-btn" @successCBK =" imageSuccessCBK" />
@@ -63,6 +63,13 @@ export default {
6363 computed: {
6464 language () {
6565 return this .languageTypeList [this .$store .getters .language ]
66+ },
67+ containerWidth () {
68+ const width = this .width
69+ if (/ ^ [\d ] + (\. [\d ] + )? $ / .test (width)) { // matches `100`, `'100'`
70+ return ` ${ width} px`
71+ }
72+ return width
6673 }
6774 },
6875 watch: {
@@ -96,7 +103,6 @@ export default {
96103 language: this .language ,
97104 selector: ` #${ this .tinymceId } ` ,
98105 height: this .height ,
99- width: this .width ,
100106 body_class: ' panel-body ' ,
101107 object_resizing: false ,
102108 toolbar: this .toolbar .length > 0 ? this .toolbar : toolbar,
You can’t perform that action at this time.
0 commit comments