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

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

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

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