gitlab-org--gitlab-foss/app/assets/javascripts/ci_lint_editor.js
2017-10-10 11:06:42 +00:00

12 lines
360 B
JavaScript

export default 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;
});
}
}