[英]CK Editor Remove Focus on Page Load
On the page I have added CK Editor at the very bottom , every time the page loads it get focused on the CK Editor. 在页面上,我在最底部添加了CK编辑器,每次页面加载时,它都会专注于CK编辑器。 I tried adding
我尝试添加
config.startupFocus = false;
on the config.js file, but doesn't seems to be working. 在config.js文件上,但似乎不起作用。 I also tried to focus any other element on page load, but since the CK Editor get loaded afterwards it got focused again.
我还尝试将其他任何元素都集中在页面加载上,但是由于CK编辑器在加载之后又重新集中了。
I tried adding event listener on window frames and it doesn't worked either. 我尝试在窗口框架上添加事件侦听器,但它也不起作用。
window.frames[0].document.addEventListener('load', function() {
document.getElementById('email').focus();
});
Please suggest a way to remove focus from the CK Editor 请提出一种从CK编辑器中删除焦点的方法
I dont know a lot about ckeditor but here is what I found on thier doc. 我对ckeditor不太了解,但这是我在文档中发现的内容。 You can use the FocusManager .
您可以使用FocusManager 。
var focusManager = new CKEDITOR.focusManager( editor );
focusManager.focus();//Focus
focusManager.remove();//Remove focus
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.