[英]CKEditor enter key press scrolls to the bottom of the page
I am working on a php project in which I am using a ckeditor. 我正在使用ckeditor的php项目中工作。 Everything else seems to work fine, other than when I press enter key I get scrolled to the bottom of the page.
除按Enter键外,其他所有内容似乎均正常运行,然后滚动到页面底部。 I tried the following code.
我尝试了以下代码。
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
}
);
This doesn't help. 这没有帮助。 Can anyone please tell me how to solve this issue.
谁能告诉我如何解决这个问题。
I've fixed such issue in my project by changing any CSS rule height: 100%
to height: auto
for parent elements of editing area. 我已经通过更改CSS规则的
height: 100%
更改为height: auto
编辑区域的父元素)来解决此问题。 In my case it was <html>
, so check whole hierarchy. 就我而言,它是
<html>
,因此请检查整个层次结构。
You set the enter mode to using a div. 您将输入模式设置为使用div。
You could have some kind of style on divs height? 您可以在divs高度上使用某种样式吗?
Can you test it by switching to 您可以切换到
enterMode : CKEDITOR.ENTER_P
Does this change the behaviour? 这会改变行为吗?
UPDATE : i found this: fixed bug Maybe updating ckeditor could fix the problem. 更新:我发现了此问题:已修复的错误也许更新ckeditor可以解决此问题。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.