vue2-ace-editor
vue2-ace-editor copied to clipboard
Example: linting/validation
Hey, I was wondering if you'd consider throwing up a sample for enabling linting/validation? I'm trying to get mine setup with YAML but I'm not really sure to start.
So far I've got it working with the following in template tags:
<editor
v-model="form.content"
@init="editorInit"
lang="yaml"
:theme='editorTheming()'
:height="windowHeight"
:width="windowWidth"
class="editor"
></editor>
and the following in script tags:
components: {
editor: require("vue2-ace-editor")
},
methods: {
editorInit() {
require("brace/mode/yaml");
require("brace/theme/twilight");
require("brace/theme/textmate");
},
editorTheming(){
if ( this.$vuetify.theme.dark == false) {
return "textmate"
} else {
return "twilight"
}
},
This works great and has auto light/darkmode to match my theme but no syntax highlighting or errors.
same request