> For the complete documentation index, see [llms.txt](/llms.txt).
> The full corpus is at [llms-full.txt](/llms-full.txt).

# DecorationRegistration

Defined in: packages/editor/src/types/editor.ts:344

The handle returned by `editor.registerDecorations`.

:::caution[Beta]
This API should not be used in production and may be trimmed from a public release.
:::

## Methods

### getDecorations()

> **getDecorations**(): [`DecorationPosition`](/api/editor/type-aliases/decorationposition/)[]

Defined in: packages/editor/src/types/editor.ts:356

Live decorations at call time: id + edit-adjusted range. Destroyed and
removed decorations are absent. Fresh array per call, with no
reference stability or change cadence. Reflects a completed `update()`
immediately and a burst of `onMapped` calls as of the latest one.
Empty before the editor's `ready` event.

:::caution[Beta]
This API should not be used in production and may be trimmed from a public release.
:::

#### Returns

[`DecorationPosition`](/api/editor/type-aliases/decorationposition/)[]

***

### unregister()

> **unregister**(): `void`

Defined in: packages/editor/src/types/editor.ts:348

A no-op if already unregistered.

:::caution[Beta]
This API should not be used in production and may be trimmed from a public release.
:::

#### Returns

`void`

***

### update()

> **update**(`decorations`): `void`

Defined in: packages/editor/src/types/editor.ts:346

Full-set replacement, reconciled by `id`.

:::caution[Beta]
This API should not be used in production and may be trimmed from a public release.
:::

#### Parameters

##### decorations

[`Decoration`](/api/editor/interfaces/decoration/)[]

#### Returns

`void`