美文网首页
vue 获取 富文本编译器 wangEditor 内容

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

作者: _TAPE_ | 来源:发表于2019-09-30 18:15 被阅读0次

 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);

            });

            }

          },

        })

相关文章

网友评论

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

      本文链接:https://www.haomeiwen.com/subject/ydjhpctx.html