This page is available as Markdown at /api/editor/interfaces/decorationregistration.md. For the full documentation index, see /llms.txt, or the complete corpus at /llms-full.txt.
DecorationRegistration
Defined in: packages/editor/src/types/editor.ts:344
The handle returned by editor.registerDecorations.
Methods
Section titled “Methods”getDecorations()
Section titled “getDecorations()”getDecorations():
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.
Returns
Section titled “Returns”unregister()
Section titled “unregister()”unregister():
void
Defined in: packages/editor/src/types/editor.ts:348
A no-op if already unregistered.
Returns
Section titled “Returns”void
update()
Section titled “update()”update(
decorations):void
Defined in: packages/editor/src/types/editor.ts:346
Full-set replacement, reconciled by id.
Parameters
Section titled “Parameters”decorations
Section titled “decorations”Returns
Section titled “Returns”void