---
title: "Advanced editing behaviors"
description: "Learn about some edge case editor behavior."
canonical_url: "https://www.tiny.cloud/docs/tinymce/latest/content-behavior-options/"
md_url: "https://www.tiny.cloud/docs/tinymce/5/content-behavior-options/index.md"
version: "5"
last_updated: "2024-04-09T10:06:54Z"
tokens: 1027
---
Important This page documents TinyMCE 5. For new projects, Tiny recommends using the latest, most up-to-date version. [See TinyMCE 8 documentation](../../latest/content-behavior-options/).
# Advanced editing behaviors

## `br_in_pre`

This option allows you to disable TinyMCE’s default behavior when pressing the enter key within a `pre` tag. By default, pressing enter within a `pre` tag produces a `br` tag at the insertion point. For example:

`<pre>This is inside<br>a pre tag.</pre>`

However, when `br_in_pre` is set to `false`, rather than inserting a `br` tag TinyMCE will split the `pre` tag. For example:

`<pre>This is inside </pre><pre>a pre tag.</pre>`

> **Note:** when set to `false`, `shift+enter` will insert a `br` tag.
**Type:** `Boolean`

**Default Value:** `true`

**Possible Values:** `true`, `false`

### Example: Using `br_in_pre`

```js
tinymce.init({
  selector: 'textarea',  // change this value according to your HTML
  br_in_pre: false
});
```

## `custom_undo_redo_levels`

This option should contain the number of undo levels to keep in memory. By default, it is set to use an unlimited number of undo levels. The value of `custom_undo_redo_levels` should be 10 or lower for low-end systems otherwise it **steals a lot of memory**.

**Type:** `Number`

**Default Value:** `unlimited`

### Example: Using `custom_undo_redo_levels`

```js
tinymce.init({
  selector: 'textarea',  // change this value according to your HTML
  custom_undo_redo_levels: 10
});
```

## `end_container_on_empty_block`

This option allows you to to split the current container block element if the enter key is pressed inside an empty inner block element.

**Type:** `Boolean`

**Default Value:** `false` // confirmation required

**Possible Values:** `true`, `false`

### Example: Using `end_container_on_empty_block`

```js
tinymce.init({
  selector: 'textarea',  // change this value according to your HTML
  end_container_on_empty_block: true
});
```

## `object_resizing`

This options allows you to turn on/off the resizing handles on images, tables or media objects. This option is enabled by default and allows you to resize table and images. You can also specify a CSS3 selector of what you want to enable resizing on.

### Disable all resizing of images/tables

**Type:** `Boolean`, `String`

**Default Value:** `true`

**Possible Values:** `true`, `false`, `img`

> **Note:** The default option for this setting is different for mobile devices. For information on the default mobile setting, see: [TinyMCE Mobile - Configuration settings with mobile defaults](../tinymce-for-mobile/#mobiledefaultsforselectedsettings).

#### Example: Disable object resizing

```js
tinymce.init({
  selector: 'textarea',  // change this value according to your HTML
  object_resizing : false
});
```

### Enable resizing on images only

**Type:** `Boolean`, `String`

**Default Value:** `true`

**Possible Values:** `true`, `false`, `img`

#### Example: Enable object resizing for images

```js
tinymce.init({
  selector: 'textarea',  // change this value according to your HTML
  object_resizing : 'img'
});
```

## `resize_img_proportional`

When a user resizes an image in the editor, this option controls whether image is resized proportionally or freely. If set to:

- `true` — When users resize an image, the image will be resized proportionally (both dimensions of the image are resized by the same percentage of length). Users can freely resize images by holding the `Shift` key while resizing.
- `false` — When users resize an image, the image can be resized freely. Users can proportionally resize images by holding the `Shift` key while resizing.

**Type:** `Boolean`

**Default Value:** `true`

**Possible Values:** `true`, `false`

### Example: Using `resize_img_proportional`

To disable proportional image resizing:

```js
tinymce.init({
  selector: 'textarea',  // change this value according to your HTML
  resize_img_proportional: false
});
```

## `typeahead_urls`

This option allows disabling the type ahead url field feature.

**Type:** `Boolean`

**Default Value:** `true`

**Possible Values:** `true`, `false`

### Example: Using `typeahead_urls`

```js
tinymce.init({
  selector: 'textarea',
  typeahead_urls: false
});
```
