I'm using angular 8 in my project and I'm trying to implement ngx-CKEditor. I need to add custom text in the editor this should happen When I click the list I need to add the content inside the CKEditor.
i tried with this code but not working for me.
<ck-editor name="editor" #myEditor [(ngModel)]="editorValue" skin="moono-lisa" language="en" [fullPage]="true"></ck-editor>
<ul>
<li (click)="selectText('adasdasd1')">adasdasd1</li>
<li (click)="selectText('adasdasd2')">adasdasd2</li>
</ul>
In ts file
public editorValue;
@ViewChild("editor", { static: true }) myEditor: any;
click event in ts file
selectText(value) {
this.myEditor.instances.insertText(value);
}
I am getting an error: ERROR TypeError: Cannot read property 'instances' of undefined