[英]How can I set focus to CKEditor 5 with jQuery?
I've created a CKEditor field and initialized it like this:我创建了一个 CKEditor 字段并像这样初始化它:
ClassicEditor
.create(document.querySelector('#note}'))
.then(editor => {
noteEditor = editor;
})
.catch( error => {
console.error( error );
});
All I want to do is either:我想做的就是:
If I cannot set focus to it anytime (not just at start-up) can someone suggest a nice looking editor?如果我不能在任何时候(不仅仅是在启动时)设置焦点,有人可以推荐一个漂亮的编辑器吗?
To set focus at the beginning of the text editor is as follows:在文本编辑器的开头设置焦点如下:
ClassicEditor
.create(document.querySelector('#note}'))
.then(editor => {
editor.editing.view.focus();
})
.catch( error => {
console.error( error );
});
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.