1 import { Component, OnInit, ViewChild, Input, AfterViewInit } from '@angular/core';
2 // import 'brace/ext/searchbox';
3 // import 'ace-builds/webpack-resolver';
5 // import 'brace/ext/language_tools';
6 // import 'ace-builds/src-min-noconflict/snippets/html';
9 selector: 'app-source-editor',
10 templateUrl: './source-editor.component.html',
11 styleUrls: ['./source-editor.component.css']
13 export class SourceEditorComponent implements OnInit, AfterViewInit {
16 @Input() Data: string;
17 @Input() lang: string;
19 @ViewChild('editor', { static: false }) editor;
23 // throw new Error("Method not implemented.");
29 this.editor.setTheme('eclipse');
31 this.editor.getEditor().setOptions({
32 enableBasicAutocompletion: true
35 this.editor.getEditor().commands.addCommand({
36 name: 'showOtherCompletions',