Open crlsmsq opened 2 years ago
You can try the following.
In your template:
<jodit-editor #editor></jodit-editor>
in your component:
import { Component, OnInit, ViewChild } from '@angular/core';
import { JoditAngularComponent } from 'jodit-angular';
@Component({
selector: 'app-foo',
templateUrl: './foo.component.html',
styleUrls: ['./foo.component.scss']
})
export class FooComponent implements OnInit {
@ViewChild('editor', { static: true }) editor: JoditAngularComponent;
ngOnInit(): void {
this.editor.value = 'Hello from foo.';
}
}
An editor loaded event with the editor as a param to the callback would be awesome, but I don't think it's implemented :(
Cheers.
Hi I would like to get the editor upon initialization. is there any way i could do this?