Skip to content

Option

Defined in: packages/markput/src/types.ts:54

React-specific markup option for defining mark behavior and styling.

const option: Option<ChipProps> = {
markup: '@[__value__]',
mark: { slot: Chip, label: 'Click' }
}
  • CoreOption
Type ParameterDefault typeDescription
TMarkPropsMarkPropsType of props for the mark component
TOverlayPropsOverlayPropsType of props for the overlay component
optional mark: TMarkProps | (props) => TMarkProps;

Defined in: packages/markput/src/types.ts:59

Props for the mark component. Can be a static object or a function that transforms MarkProps.


optional markup: Markup;

Defined in: packages/core/src/shared/types.ts:35

Template string in which the mark is rendered. Must contain placeholders: __value__, __meta__, and/or __nested__

Placeholder types:

  • __value__ - main content (plain text, no nesting)
  • __meta__ - additional metadata (plain text, no nesting)
  • __nested__ - content supporting nested structures
// Simple value
"@[__value__]"
// Value with metadata
"@[__value__](__meta__)"
// Nested content support
"@[__nested__]"
CoreOption.markup

optional overlay: TOverlayProps;

Defined in: packages/markput/src/types.ts:63

Props for the overlay component.