vue2.0 tinymce 报错tinymce.js:1893 Uncaught TypeError: styles.getPropertyValue is not a function?

vue2.0 tinymce 报错tinymce.js:1893 Uncaught TypeError: styles.getPropertyValue is not a function
插件和配置该加的都加上了,一输入或者点击任何tinymce按钮报错Uncaught TypeError: styles.getPropertyValue is not a function
版本@tinymce/tinymce-vue": "^3.0.1" "tinymce": "^5.10.9",

<!-- tinymc富文本 -->
<template>
    <div>
      <Editor
        v-model="myValue"
        :init="init"
        :disabled="disabled"
        @onClick="onClick">
      </Editor>
    </div>
  </template>
  
  <script>
 
  import Editor from "@tinymce/tinymce-vue";
  import "tinymce/skins/ui/oxide/skin.css";
  import "tinymce/themes/silver/theme";
  import 'tinymce/plugins/table'
  import "tinymce/plugins/lists";
  import "tinymce/plugins/textcolor";
  import "@/i18n/tinymce/zh_CN.js"
  import "tinymce/icons/default"; // 图标 -解决测试环境找不icon问题
  export default {
    name: "tinymce",
    components: {
      Editor,
    },
    props: {
      //传入一个value,使组件支持v-model绑定
      value: {
        type: String,
        default: "",
      },
      disabled: {
        type: Boolean,
        default: false,
      }
    },
    data() {
      return {
        //初始化配置
        init: {
          height: 500,
          width: "100%",
          plugins: 'lists table textcolor',
          branding: true,
          menubar: false,
          resize: true,
          language: 'zh_CN',
          toolbar: 'bold italic forecolor | alignleft aligncenter alignright alignjustify | numlist bullist outdent indent | table',

        },
        myValue: this.value,
      };
    },
    watch:{
      myValue(value){
             console.log(11111111111111,value)
            }
        },
    mounted() {
     // tinymce.init({}); 
    },
    methods: {
      //添加相关的事件,可用的事件参照文档=> https://github.com/tinymce/tinymce-vue => All available events
      //需要什么事件可以自己增加
      onClick(e) {
        console.log("e",e)
       // this.$emit("onClick", e, tinymce);
      },
      clear() {
        this.myValue = "";
      },
    },
    watch: {
      value(newValue) {
        this.myValue = newValue;
      },
      myValue(newValue) {
        this.$emit("input", newValue);
      },
    },
  };
  </script>
  <style scoped>

  </style>
阅读 589
撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进
推荐问题