如何解决为他的击键获取 Angular CKEditor5 实例
角 12
打字稿 4.2
我关注了 this tutorial 以进行 CKEditor 集成。
我将从 CKEditor 访问 keystrokes。
我代码中的两个变量(editorComponent 和 ckEditor)都没有我可以访问击键的成员!?!?
如何获取 CKEditor 的实例以访问击键?
如何在 Angular 中访问 CKEditor 的按键?
我的 component.ts:
import * as ClassicEditor from '@ckeditor/ckeditor5-build-classic';
export class MyClass implements AfterViewChecked {
@ViewChild('editor') editorComponent: CKEditorComponent;
public ckEditor = ClassicEditor;
myData = '<p>Hello World</p>';
ngAfterViewChecked(): void {
console.log(this.ckEditor); // undefined
console.log(this.editorComponent.editor); // class _w extends xu{}
}
}
我的 component.html:
<ckeditor #editor [editor]="ckEditor" [data]="myData"></ckeditor>
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。