Option
Defined in: packages/markput/src/types.ts:48
React-specific markup option for defining mark behavior and styling.
Example
Section titled “Example”const option: Option = { markup: '@[__value__]', slots: { mark: Button }, slotProps: { mark: { label: 'Click' } }}Extends
Section titled “Extends”CoreOption
Type Parameters
Section titled “Type Parameters”| Type Parameter | Default type |
|---|---|
TMarkProps | MarkProps |
TOverlayProps | OverlayProps |
Properties
Section titled “Properties”markup?
Section titled “markup?”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
Examples
Section titled “Examples”// Simple value"@[__value__]"// Value with metadata"@[__value__](__meta__)"// Nested content support"@[__nested__]"Inherited from
Section titled “Inherited from”CoreOption.markupslotProps?
Section titled “slotProps?”optional slotProps: object;Defined in: packages/markput/src/types.ts:61
Props for slot components.
optional mark: TMarkProps | (props) => TMarkProps;Props for the mark component. Can be a static object or a function that transforms MarkProps.
overlay?
Section titled “overlay?”optional overlay: TOverlayProps;Props for the overlay component.
slots?
Section titled “slots?”optional slots: object;Defined in: packages/markput/src/types.ts:52
Per-option slot components.
optional mark: ComponentType<TMarkProps>;Mark component for this option.
overlay?
Section titled “overlay?”optional overlay: ComponentType<TOverlayProps>;Overlay component for this option.