danielebarchiesi@0: danielebarchiesi@0: danielebarchiesi@0: danielebarchiesi@0:
danielebarchiesi@0:
danielebarchiesi@0: This sample shows how to configure CKEditor instances to use the
danielebarchiesi@0: AutoGrow (autogrow
) plugin that lets the editor window expand
danielebarchiesi@0: and shrink depending on the amount and size of content entered in the editing area.
danielebarchiesi@0:
danielebarchiesi@0: In its default implementation the AutoGrow feature can expand the danielebarchiesi@0: CKEditor window infinitely in order to avoid introducing scrollbars to the editing area. danielebarchiesi@0:
danielebarchiesi@0:
danielebarchiesi@0: It is also possible to set a maximum height for the editor window. Once CKEditor
danielebarchiesi@0: editing area reaches the value in pixels specified in the
danielebarchiesi@0: autoGrow_maxHeight
danielebarchiesi@0:
configuration setting, scrollbars will be added and the editor window will no longer expand.
danielebarchiesi@0:
danielebarchiesi@0: To add a CKEditor instance using the autogrow
plugin and its
danielebarchiesi@0: autoGrow_maxHeight
attribute, insert the following JavaScript call to your code:
danielebarchiesi@0:
CKEDITOR.replace( 'textarea_id', danielebarchiesi@0: { danielebarchiesi@0: extraPlugins : 'autogrow', danielebarchiesi@0: autoGrow_maxHeight : 800, danielebarchiesi@0: // Remove the Resize plugin as it does not make sense to use it in conjunction with the AutoGrow plugin. danielebarchiesi@0: removePlugins : 'resize' danielebarchiesi@0: });danielebarchiesi@0:
danielebarchiesi@0: Note that textarea_id
in the code above is the id
attribute of
danielebarchiesi@0: the <textarea>
element to be replaced with CKEditor. The maximum height should
danielebarchiesi@0: be given in pixels.
danielebarchiesi@0: