<template>
    <div id="methodsWay"></div>
</template>

<script>
import E from 'wangeditor'
var phoneEditor, _this
export default {
  components: {},
  props: {
    methodsWayVal: {
      type: String,
      required: false
    }
  },
  data () {
    return {}
  },
  created () {},
  mounted () {
    _this = this
    phoneEditor = new E('methodsWay')
    phoneEditor.onchange = function () {
      _this.$emit('methodsWay', this.$txt.html())
    }

    phoneEditor.create()
    // phoneEditor.$txt.html(this.val)
  },
  methods: {},
  computed: {},
  watch: {
    methodsWayVal (val) {
      // console.log(val)
      phoneEditor.$txt.html(_this.methodsWayVal)
    }
  }
}
</script>

<style lang="scss" scoped>
#methodsWay {
  width: 100%;
  height: 250px;
}
</style>
