This page is available as Markdown at /api/editor/functions/definedecoration.md. For the full documentation index, see /llms.txt, or the complete corpus at /llms-full.txt.
defineDecoration
defineDecoration(
decoration):Decoration
Defined in: packages/editor/src/define-decoration.ts:12
An identity helper in the defineSchema/defineDecorator tradition:
contextual typing and autocomplete for a Decoration literal without
annotating it yourself. Accepts every member of the Decoration
union. Unrelated to defineDecorator, which defines a schema mark
like strong; a Decoration is an ephemeral visual layer entry for
editor.registerDecorations.