I am using ace editor and trying to achieve auto-completion in editor. I tried with options but its not working and I am getting warnings.Any idea?
Ace Editor Component
import {
Component, EventEmitter, Input, OnInit, Output, ViewChild
} from '@angular/core';
@Component({
selector: 'neon-ace-editor',
templateUrl: './ace-editor.component.html',
styleUrls: ['./ace-editor.component.scss']
})
export class AceEditorComponent implements OnInit {
@Input() mode = 'html';
@Input() autoUpdateContent = true;
@Input() content: string;
@Output() onContentChange: EventEmitter<string> = new EventEmitter();
@ViewChild('editor') editor;
options = {
enableBasicAutocompletion: true,
enableSnippets: true,
enableLiveAutocompletion: true
};
ngOnInit(): void {
this.editor._editor.$blockScrolling = Infinity;
}
onContentChanging(): void {
this.onContentChange.emit(this.content);
}
}
Ace Editor Html
<ace-editor [(text)]="content"
#editor
(textChanged)="onContentChanging()"
[options]="options"
[autoUpdateContent]="autoUpdateContent"
style="min-height: 500px; width:100%; font-size:18px;overflow: auto;"
[mode]="mode"></ace-editor>
Issue:
Auto-complete is not working.
Warning messages in console