Type Alias: TextBufferProps
TextBufferProps =
object
Defined in: nodes/text-buffer.ts:24
Props for the TextBuffer virtual element.
Used to declaratively configure the text buffer for a GtkTextView. For GtkSourceView with syntax highlighting, use SourceBufferProps instead.
Example
<GtkTextView>
<x.TextBuffer
text="Hello, World!"
enableUndo
onTextChanged={(text) => console.log("Text:", text)}
/>
</GtkTextView>
Properties
enableUndo?
optionalenableUndo:boolean
Defined in: nodes/text-buffer.ts:28
Whether to enable undo/redo
onCanRedoChanged()?
optionalonCanRedoChanged: (canRedo) =>void
Defined in: nodes/text-buffer.ts:34
Callback when can-redo state changes
Parameters
| Parameter | Type |
|---|---|
canRedo | boolean |
Returns
void
onCanUndoChanged()?
optionalonCanUndoChanged: (canUndo) =>void
Defined in: nodes/text-buffer.ts:32
Callback when can-undo state changes
Parameters
| Parameter | Type |
|---|---|
canUndo | boolean |
Returns
void
onTextChanged()?
optionalonTextChanged: (text) =>void
Defined in: nodes/text-buffer.ts:30
Callback when the text content changes
Parameters
| Parameter | Type |
|---|---|
text | string |
Returns
void
text?
optionaltext:string
Defined in: nodes/text-buffer.ts:26
Text content