2017-10-10 11:06:42 +00:00
|
|
|
export default class CILintEditor {
|
2017-03-11 07:30:44 +00:00
|
|
|
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;
|
|
|
|
});
|
2017-01-04 21:44:16 +00:00
|
|
|
}
|
2017-03-11 07:30:44 +00:00
|
|
|
}
|