Skip to main content

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?

optional enableUndo: boolean

Defined in: nodes/text-buffer.ts:28

Whether to enable undo/redo


onCanRedoChanged()?

optional onCanRedoChanged: (canRedo) => void

Defined in: nodes/text-buffer.ts:34

Callback when can-redo state changes

Parameters

ParameterType
canRedoboolean

Returns

void


onCanUndoChanged()?

optional onCanUndoChanged: (canUndo) => void

Defined in: nodes/text-buffer.ts:32

Callback when can-undo state changes

Parameters

ParameterType
canUndoboolean

Returns

void


onTextChanged()?

optional onTextChanged: (text) => void

Defined in: nodes/text-buffer.ts:30

Callback when the text content changes

Parameters

ParameterType
textstring

Returns

void


text?

optional text: string

Defined in: nodes/text-buffer.ts:26

Text content