CKEditor 高度随着使用输入而增长

CKEditor height grow as use typing

我有一个 ckEditor,我想让 ckEditor 的高度在我输入时自动增长。

<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>

有没有办法通过 JS 或 CSS 来实现?

使用 Auto Grow 插件。

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.