我试图在一个棱角形的应用程序中捕捉到CKEditor5内部的输入,使用类型记录。我能够让CKEditor显示,并能够记录编辑器的存在。然而,我似乎无法捕捉到输入。在CKEditor4中,这似乎非常简单,在这里,下面这样的简单代码起作用了:
editor.on('key', function (event) {
//some work goes here
}
然而,用我当前的ClassicEditor来尝试这一点似乎不是这样的。我正在使用CKEditor5,并已在index.html中初始化了它,并以以下格式在代码中调用它
declare var ClassicEditor:
我正在使用ckeditor5,它在我的项目的一个页面上工作得很好,但问题是当我从另一个应用程序指向/重定向页面时,它会通过一个uncatch异常
请建议我如何解决这个问题。
以下是例外情况:
Failed to load resource: the server responded with a status of 404 ():8080/demo/ckeditor5/config.js?t=G2VC:1
Failed to load resource: the server responded with a status of 404 ():8080/demo/ckeditor5/lan
在编辑器中设置文本之后,我需要将焦点设置为文本的末尾。该怎么做呢?我不明白
editor.setData('text');
editor.editing.view.focus(); // focus to set the beginning, but on the end
示例:
// Editor configuration.
ClassicEditor
.create( document.querySelector( '#editor' ))
.then( editor => {
window.editor = editor;
})