Ace editor component for Vue
Install with npm i vue-ace-edit
Or clone the repo in your project
git clone https://github.com/jellehak/vue-ace-edit
Add the plugin:
import VueAceEdit from "vue-ace-edit"
Vue.use(VueAceEdit)
This will add two global components: AceEditor
, AceEditorJson
If no ace
global can be found this plugin will async load the library from https://cdnjs.cloudflare.com/ajax/libs/ace/1.4.12
.
If you want to load it from a different location or a specific version then make sure a ace
global exist by loading something from a CDN like:
<script src="https://cdnjs.cloudflare.com/ajax/libs/ace/1.4.3/ace.min.js"></script>
<AceEditor :value="`<div>Hello</div>`" mode="html"/>
Wrapper component that encode/ decodes JSON objects
<AceEditorJson :value="{hello:'cool'}" />