Editor Size
These options control the dimensions of the editor and whether the user can resize it.
Options
| Option | Type | Default | Description |
|---|---|---|---|
width | string/number | element width | Width of the editor. Accepts a number (pixels) or a CSS string such as '100%'. |
height | string/number | max(element height, 400) | Height of the editor. Accepts a number (pixels) or a CSS string. |
min_width | number | — | Minimum width in pixels. Prevents the user from resizing below this value. |
max_width | number | — | Maximum width in pixels. Prevents the user from resizing above this value. |
min_height | number | 100 | Minimum height in pixels. |
max_height | number | — | Maximum height in pixels. |
resize | boolean/string | true | Controls the resize handle. true for vertical resizing only, 'both' for vertical and horizontal, false to disable. |
note
For automatic height adjustment based on content, see the Autoresize plugin.
Example
editor42.init({
selector: 'textarea',
width: '100%',
height: 600,
min_height: 300,
max_height: 900,
resize: 'both'
});