# DetachRootEvent

typedef

Fired whenever a root is [detached](module_editor-multi-root_multirooteditor-MultiRootEditor.md#function-detachRoot) from the editor model.

Use this event to [destroy a DOM editable](module_editor-multi-root_multirooteditor-MultiRootEditor.md#function-detachEditable) for the detached root and remove the DOM element from your application.

The event is fired after all changes from a given batch are applied. The event is not fired, if the root was detached and re-added in the same batch.

[See source](https://github.com/ckeditor/ckeditor5/blob/master/packages/ckeditor5-editor-multi-root/src/multirooteditor.ts#L1376)

<a id="properties">

## Properties

<a id="member-args">

### `args: [ root: ModelRootElement ]`

<a id="member-name">

### `name: 'detachRoot'`

#### Value

`object`

## Fired by

* [MultiRootEditor#detachRoot](module_editor-multi-root_multirooteditor-MultiRootEditor.md#event-detachRoot)

---

Full index of the CKEditor 5 API reference: [llms.txt](llms.txt)
