# Editor Size

> Editor42 size options — the editor's width and height, the limits it can be resized to, and whether its resize handle works vertically or in both directions.

Source: https://editor42.com/api/configuration/editor-size  
Section: Configuration Options > Editor Size  
Every page of editor42.com has a Markdown copy at its URL + `.md` (`index.md` after a URL that ends in `/`); all of them are in one file: https://editor42.com/llms-full.txt

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](https://editor42.com/plugins/autoresize).

## Example

```js
editor42.init({
  selector: 'textarea',
  width: '100%',
  height: 600,
  min_height: 300,
  max_height: 900,
  resize: 'both'
});
```
