Я использую Angular 6 и ckeditor через оболочку https://github.com/chymz/ng2-ckeditor/.
Мне нужно изменить текст, прежде чем ckeditor обновит текст в редакторе.
У меня есть метод, который получает обновленный текст от ckeditorcomponent.
onChange(newText: string): void {
this.model.context.content.md = Markdown(newText);
this.model.context.content.text =
typograf.execute(this.model.context.content.md);
// this.editor.setData(this.model.context.content.text)
// will do infinity recursive call
// how to avoid it?
}
Кто-нибудь знает лучшее решение для моего случая?