Reputation: 1
I am using CKEditor in my project, I have requirement to print ckeditor content on page so I want to restrict height of ckeditor, so I have give height as 220px and removed scrollbars using overflow : hidden, but when user go to end of ckeditor area and presses enter, content increases without scrollbar option.
Is there any way by which i can restrict number of rows of content in ckeditor?
Below is my code for ckeditor:
CKEDITOR.replace('summaryEditor',
{
toolbar:
[
{ name: 'customToolBar', items: ['Bold', 'Italic', 'Underline', 'JustifyLeft', 'JustifyCenter', 'Font', 'FontSize', 'NumberedList', 'BulletedList', 'Link', 'Image', 'Table', 'Source', 'questions'] }
],
height: '220px',
resize_enabled: false,
contentsCss: 'body {overflow:hidden;}',
autoGrow_onStartup: false,
extraPlugins: 'questions',
removePlugins: 'elementspath'
});
Upvotes: 0
Views: 878
Reputation: 1063
The autogrow plugin is not part of the 3 default builds of CKEditor, basic, standard or full. So i'm not sure how you got that installed and enabled if you don't want it.
But if you just add 'autogrow' to your removePlugins list it should stop.
But still, your height setting should override the editor contents height. I just set height to 100 and it works fine.
CKEDITOR.replace('editor', {
height: 100
});
Here is a plnkr to demonstrate: http://plnkr.co/edit/lsFaT1CMMeDePnjVc5RD?p=preview
Upvotes: 0