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.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Naimish MakwanaPosted Apr 10, 2024, 5:02 AM
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: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