vue 获取 富文本编译器 wangEditor 内容

2019-09-30  本文已影响0人  _TAPE_

 new Vue({

          el:"#app",

          data:{

            title: "",

            words:"",

          },

          mounted(){

            var E = window.wangEditor;

      var editor = new E('#editor');

      editor.customConfig.onchange = (html) => {

          this.words = html

        }

        editor.create()

          },

          methods:{

            update:function(){

              axios.post('http://localhost/public/index.php/index/Dbxx/upload', {

            title: this.title,        // 参数 firstName

            words: this.words,    // 参数 lastName

          })

            .then(function (response) {

              console.log(response);

            })

            .catch(function (error) {

                console.log(error);

            });

            }

          },

        })

上一篇 下一篇

猜你喜欢

热点阅读