MarkedInputProps
Defined in: react/markput/src/components/MarkedInput.tsx:28
Props for MarkedInput component.
Example
Section titled “Example”<MarkedInput<ChipProps> Mark={Chip} options={[{ markup: '@[__value__]', mark: { label: 'Click me' } }]}/>Type Parameters
Section titled “Type Parameters”| Type Parameter | Default type | Description |
|---|---|---|
TMarkProps |
MarkProps |
Type of props for the global Mark component |
TOverlayProps extends CoreOption["overlay"] |
OverlayProps |
Type of props for the global Overlay component |
Properties
Section titled “Properties”className?
Section titled “className?”optional className: string;Defined in: react/markput/src/components/MarkedInput.tsx:44
Additional classes
defaultValue?
Section titled “defaultValue?”optional defaultValue: string;Defined in: react/markput/src/components/MarkedInput.tsx:71
Initial value for uncontrolled mode — the value the editor starts from when no value
prop is given. It is read once: setting it later does not move an editor that already
holds a value, and it is NOT what a controlled editor reverts to. Dropping value
(passing undefined after a string) keeps whatever is on screen; to go back to some
earlier text, pass it.
draggable?
Section titled “draggable?”optional draggable: boolean | DraggableConfig;Defined in: react/markput/src/components/MarkedInput.tsx:115
Enable drag interaction on rows. Ineffective when separator is null.
Default
Section titled “Default”falsehistory?
Section titled “history?”optional history: boolean;Defined in: react/markput/src/components/MarkedInput.tsx:111
Does the editor keep its own undo stack (ADR-0012). Ctrl/Cmd+Z undoes and Shift+Ctrl/Cmd+Z
redoes, in both value modes — in a controlled editor an entry is recorded only once the
parent has echoed the value back, so an emission your onChange declines leaves nothing
behind.
false turns both keys back into no-ops. It does NOT hand undo to the browser: the input
guard has swallowed native undo since ADR-0006, because a native undo would edit DOM the
model owns.
Default
Section titled “Default”trueindent?
Section titled “indent?”optional indent: string;Defined in: react/markput/src/components/MarkedInput.tsx:99
The indent unit a NESTED row leads with (ADR-0010): editor-level like separator, and
structural in the same sense — a leading run of it at a row’s own start belongs to no
markup and no caret may enter it.
'' turns nesting off, and with it row TYPING on every indented line: a line whose first
character is not an opener is a paragraph. Pass it when the document stores leading
indentation as content.
Default
Section titled “Default”'\t'optional Mark: ComponentType<TMarkProps>;Defined in: react/markput/src/components/MarkedInput.tsx:34
Global component used for rendering markups (fallback for option.Mark)
onChange()?
Section titled “onChange()?”optional onChange: (value) => void;Defined in: react/markput/src/components/MarkedInput.tsx:73
Change event handler
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
value |
string |
Returns
Section titled “Returns”void
options?
Section titled “options?”optional options: Option<TMarkProps, TOverlayProps>[];Defined in: react/markput/src/components/MarkedInput.tsx:42
Configuration options for markups and overlays. Each option can specify its own component via option.Mark or option.Overlay. Falls back to global Mark/Overlay components when not specified.
Overlay?
Section titled “Overlay?”optional Overlay: ComponentType<TOverlayProps>;Defined in: react/markput/src/components/MarkedInput.tsx:36
Global component used for rendering overlays (fallback for option.Overlay)
readOnly?
Section titled “readOnly?”optional readOnly: boolean;Defined in: react/markput/src/components/MarkedInput.tsx:75
Read-only mode
optional ref: Ref<MarkputHandle>;Defined in: react/markput/src/components/MarkedInput.tsx:30
Ref to the editor API (spec §2.3)
separator?
Section titled “separator?”optional separator: string | null;Defined in: react/markput/src/components/MarkedInput.tsx:88
The structural row separator (issue 08, ADR-0011): editor-level, never part of any markup, and the whole of what makes a document rows. Each piece between two separators is a row, with its own drag grip and row menu.
null says the value never splits: one document, no rows, no row controls — a plain
annotated text field.
An empty string separates nothing: the editor reports it and renders the document as if it
were null.
Default
Section titled “Default”'\n'showOverlayOn?
Section titled “showOverlayOn?”optional showOverlayOn: OverlayTrigger;Defined in: react/markput/src/components/MarkedInput.tsx:61
Events that trigger overlay display
Default
Section titled “Default”'change'slotProps?
Section titled “slotProps?”optional slotProps: SlotProps;Defined in: react/markput/src/components/MarkedInput.tsx:56
Props to pass to slot components
Example
Section titled “Example”slotProps={{ container: { onKeyDown: handler } }}slots?
Section titled “slots?”optional slots: Slots;Defined in: react/markput/src/components/MarkedInput.tsx:51
Override internal components using slots
Example
Section titled “Example”slots={{ container: 'div' }}optional Span: ComponentType<SpanProps>;Defined in: react/markput/src/components/MarkedInput.tsx:32
Global component used for rendering text tokens (default: built-in Span)
style?
Section titled “style?”optional style: CSSProperties;Defined in: react/markput/src/components/MarkedInput.tsx:46
Additional style
value?
Section titled “value?”optional value: string;Defined in: react/markput/src/components/MarkedInput.tsx:63
Annotated text with markups