Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Example: linting/validation #82

Open
SelfhostedPro opened this issue Jan 8, 2021 · 1 comment
Open

Example: linting/validation #82

SelfhostedPro opened this issue Jan 8, 2021 · 1 comment

Comments

@SelfhostedPro
Copy link

SelfhostedPro commented Jan 8, 2021

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.

@truemoroz
Copy link

same request

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants