javascript - CKEditor 回车键滚动到页面底部

标签 javascript php jquery html ckeditor

我正在开发一个使用 ckeditor 的 php 项目。其他一切似乎都工作正常,除了当我按回车键时我滚动到页面底部。我尝试了以下代码。

 CKEDITOR.replace( fieldId,
            {  
                height:heightVal,width:widthVal,
            toolbar: [
                { name: 'document',    items: [ 'Source' ] },
                { name: 'clipboard',   items: [ 'Cut', 'Copy', 'Paste', 'PasteText', 'PasteFromWord', 'Undo', 'Redo'] },    
                { name: 'editing', items: [ 'Find', 'Replace', '-', 'SelectAll' ] },
                { name: 'basicstyles', items: [ 'Bold', 'Italic',  'Strike', 'Subscript', 'Superscript', '-', 'RemoveFormat' ] },
                { name: 'tools', items: [ 'Maximize' ] },
                { name: 'paragraph', items: [ 'NumberedList', 'BulletedList', '-', 'Outdent', 'Indent', '-', 'JustifyLeft', 'JustifyCenter', 'JustifyRight', 'JustifyBlock' ] },
                { name: 'links', items: [ 'Link', 'Unlink'] },
                { name: 'insert', items: [ 'Image',  'Table', 'Flash', 'Video'] },
                { name: 'colors', items: [ 'TextColor' ] },
                { name: 'styles', items: [ 'Styles' ,'FontSize']},
                { name: 'about', items: [ 'About' ] }
            ],
            enterMode : CKEDITOR.ENTER_DIV
            } 

        );

这没有帮助。谁能告诉我如何解决这个问题。

最佳答案

我已经通过更改任何 CSS 规则 height: 100% 在我的项目中解决了此类问题至height: auto用于编辑区域的父元素。就我而言,它是 <html> ,所以检查整个层次结构。

关于javascript - CKEditor 回车键滚动到页面底部,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30979630/

相关文章:

javascript - Facebook如何检查用户是否喜欢页面并显示内容?

javascript - 分离表示和逻辑组件react/redux

php - 如何使子表访问另一个表 laravel

javascript - 在循环中获取 JSON 不会获取 JQuery 中的所有元素

javascript - Node js : Express js asynchronous db query execution-return results got undefiend

javascript - 页面上每个事件的 JS : Is that possible to show empty browser status line,

php - 仅部署生成的代码,不使用composer.json文件,并在 "vendor"目录中包含 "src"

php - 将 php 数组转换为 python 字典

javascript - ClearTimeout 是否可以在超时到期但尚未获得执行机会的情况下清除超时?

javascript - 在 href 标签中执行 javascript 代码