提交 3625f920 编写于 作者: P Pan

fix[Tinymce]: fixed width bug

上级 f0ca1735
<template>
<div :class="{fullscreen:fullscreen}" class="tinymce-container editor-container">
<div :class="{fullscreen:fullscreen}" class="tinymce-container" :style="{width:containerWidth}">
<textarea :id="tinymceId" class="tinymce-textarea" />
<div class="editor-custom-btn-container">
<editorImage color="#1890ff" class="editor-upload-btn" @successCBK="imageSuccessCBK" />
......@@ -63,6 +63,13 @@ export default {
computed: {
language() {
return this.languageTypeList[this.$store.getters.language]
},
containerWidth() {
const width = this.width
if (/^[\d]+(\.[\d]+)?$/.test(width)) { // matches `100`, `'100'`
return `${width}px`
}
return width
}
},
watch: {
......@@ -96,7 +103,6 @@ export default {
language: this.language,
selector: `#${this.tinymceId}`,
height: this.height,
width: this.width,
body_class: 'panel-body ',
object_resizing: false,
toolbar: this.toolbar.length > 0 ? this.toolbar : toolbar,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册