BigW Consortium Gitlab

ci_lint_editor.js 409 Bytes
Newer Older
1

2
window.gl = window.gl || {};
3

4 5 6 7 8 9 10 11 12 13
class CILintEditor {
  constructor() {
    this.editor = window.ace.edit('ci-editor');
    this.textarea = document.querySelector('#content');

    this.editor.getSession().setMode('ace/mode/yaml');
    this.editor.on('input', () => {
      const content = this.editor.getSession().getValue();
      this.textarea.value = content;
    });
14
  }
15
}
16

17
gl.CILintEditor = CILintEditor;