CKEDITOR,AutoFocus在文本编辑器onLoad上 [英] CKEDITOR, AutoFocus on the text editor onLoad

查看:119
本文介绍了CKEDITOR,AutoFocus在文本编辑器onLoad上的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

任何人都知道如何在页面加载时自动对焦CKEDITOR文本区域?

Anyone know how to autofocus on the CKEDITOR text area on page load?

目前,用户必须先单击文本区域才能开始输入。像Google一样,我希望加载页面,用户可以立即开始输入,无需单击文本区域。

Currently the user has to click in the text area before they can start typing. Like Google, I'd like the page to load and the user can immediately start typing w/o having to click the text area.

以下是启动CKEDITOR的当前代码

Here is the current code that initiated CKEDITOR

<script type="text/javascript">
CKEDITOR.replace( 'meeting_notes',
    {
        toolbar :
        [
            [ 'Bold', 'Italic', 'Underline', '-', 'NumberedList', 'BulletedList', '-', 'Link', 'Unlink' ],
            ['Cut','Copy','Paste','PasteText'],
            ['Undo','Redo','-','RemoveFormat'],
            ['TextColor','BGColor'],
            ['Maximize']
        ]
    });
</script>

谢谢

推荐答案

也许 startupFocus 配置选项?

CKEDITOR.replace( 'meeting_notes',
    {
        startupFocus : true,
        toolbar :
...

这篇关于CKEDITOR,AutoFocus在文本编辑器onLoad上的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆