MarkHandler
Defined in: packages/markput/src/utils/hooks/useMark.ts:13
Extends
Section titled “Extends”MarkStruct
Type Parameters
Section titled “Type Parameters”| Type Parameter |
|---|
T |
Properties
Section titled “Properties”change()
Section titled “change()”change: (props, options?) => void;Defined in: packages/markput/src/utils/hooks/useMark.ts:23
Change mark.
Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
props | MarkStruct | - |
options? | { silent: boolean; } | The options object |
options.silent? | boolean | If true, doesn’t change itself label and value, only pass change event. |
Returns
Section titled “Returns”void
children
Section titled “children”children: Token[];Defined in: packages/markput/src/utils/hooks/useMark.ts:51
Array of child tokens (read-only)
depth: number;Defined in: packages/markput/src/utils/hooks/useMark.ts:39
Nesting depth of this mark (0 for root-level marks)
hasChildren
Section titled “hasChildren”hasChildren: boolean;Defined in: packages/markput/src/utils/hooks/useMark.ts:43
Whether this mark has nested children
label: string;Defined in: packages/markput/src/utils/hooks/useMark.ts:9
Inherited from
Section titled “Inherited from”MarkStruct.labeloptional meta: string;Defined in: packages/markput/src/utils/hooks/useMark.ts:35
Meta value of the mark
parent?
Section titled “parent?”optional parent: MarkToken;Defined in: packages/markput/src/utils/hooks/useMark.ts:47
Parent mark token (undefined for root-level marks)
readOnly?
Section titled “readOnly?”optional readOnly: boolean;Defined in: packages/markput/src/utils/hooks/useMark.ts:31
Passed the readOnly prop value
ref: RefObject<T>;Defined in: packages/markput/src/utils/hooks/useMark.ts:17
MarkStruct ref. Used for focusing and key handling operations.
remove()
Section titled “remove()”remove: () => void;Defined in: packages/markput/src/utils/hooks/useMark.ts:27
Remove itself.
Returns
Section titled “Returns”void
value?
Section titled “value?”optional value: string;Defined in: packages/markput/src/utils/hooks/useMark.ts:10
Inherited from
Section titled “Inherited from”MarkStruct.value