<template>
    <div>
        <editor v-model="text" @init="editorInit" lang="asciidoc" theme="github" width="100%" height="500" />
    </div>
</template>

<script>
  export default {
    name: "Editor",
    data: function () {
      return {
        text: ''
      }
    },
    props: {
      content: String
    },
    components: {
      editor: require('vue2-ace-editor')
    },
    watch: {
      content: function(newValue) {
        this.text = newValue
      }
    },
    methods: {
      editorInit: function () {
        require('brace/ext/language_tools') //language extension prerequsite...
        require('brace/mode/asciidoc')    //language
        require('brace/theme/github')
      }
    }
  }
</script>

<style scoped>

</style>