Reputation: 58632
I have a ckEditor, and I want to make the height of the ckEditor auto grow as I am typing.
<textarea name="description" id="description">
</textarea>
<script>
CKEDITOR.replace( 'description' );
CKEDITOR.config.contentsCss = [CKEDITOR.getUrl('contents.css'), CKEDITOR.getUrl('/js/ckeditor/skins/moono-dark/styles.css')];
</script>
Is there a way to do it via JS or CSS ?
Upvotes: 0
Views: 420
Reputation: 3151
Use Auto Grow addon.
With this plugin, CKEditor will automatically expand and shrink vertically depending on the amount and size of content entered in its editing area.
The following configuration options are available:
maximum and minimum editor height after adjustment to content, extra space to be added between content and editor bottom bar, having auto grow happen on editor startup
Note: This plugin is designed to work only with the classic editor.
Upvotes: 2