Hi,
I am using classic ckeditor in my angular form. by default ckeditor height is growing based on content. how do i turn of autogrow feature and have a fixed height?
Hi,
I am using classic ckeditor in my angular form. by default ckeditor height is growing based on content. how do i turn of autogrow feature and have a fixed height?
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Naimish MakwanaRank #324 · 7.7K reputationPosted Apr 10, 2024, 1:02 AM EDT
You can set a fixed height for CKEditor by using the
heightconfiguration option when you initialize the editor. TheautoGrow_onStartupandautoGrow_minHeightoptions can be used to control the auto grow feature. Here’s an example:CKEDITOR.replace('editor1', { height: 200, autoGrow_onStartup: false, autoGrow_minHeight: 200, });In this code,
'editor1'is the ID of the textarea you want to replace with CKEditor. Theheightoption sets the editor’s height to 200 pixels. TheautoGrow_onStartupoption is set tofalseto disable the auto grow feature on startup, and theautoGrow_minHeightoption is set to 200 pixels to prevent the editor from shrinking below this height.Please replace
'editor1'with the actual ID of your textarea, and adjust the height as needed. Also, ensure that CKEditor is properly included in your project and that the textarea exists in the DOM when this script runs.Thanks