Variable: TextView
constTextView:"TextView"
Defined in: react/src/generated/jsx.ts:15692
Displays the contents of a [class@Gtk.TextBuffer].
You may wish to begin by reading the conceptual overview, which gives an overview of all the objects and data types related to the text widget and how they work together.
Shortcuts and Gestures
GtkTextView supports the following keyboard shortcuts:
Shift+F10orMenuopens the context menu.Ctrl+Zundoes the last modification.Ctrl+YorCtrl+Shift+Zredoes the last undone modification.Clearclears the content.
Additionally, the following signals have default keybindings:
- [signal@Gtk.TextView::backspace]
- [signal@Gtk.TextView::copy-clipboard]
- [signal@Gtk.TextView::cut-clipboard]
- [signal@Gtk.TextView::delete-from-cursor]
- [signal@Gtk.TextView::insert-emoji]
- [signal@Gtk.TextView::move-cursor]
- [signal@Gtk.TextView::paste-clipboard]
- [signal@Gtk.TextView::select-all]
- [signal@Gtk.TextView::toggle-cursor-visible]
- [signal@Gtk.TextView::toggle-overwrite]
Actions
GtkTextView defines a set of built-in actions:
clipboard.copycopies the contents to the clipboard.clipboard.cutcopies the contents to the clipboard and deletes it from the widget.clipboard.pasteinserts the contents of the clipboard into the widget.menu.popupopens the context menu.misc.insert-emojiopens the Emoji chooser.selection.deletedeletes the current selection.selection.select-allselects all of the widgets content.text.redoredoes the last change to the contents.text.undoundoes the last change to the contents.text.clearclears the content.
CSS nodes
textview.view
├── border.top
├── border.left
├── text
│ ╰── [selection]
├── border.right
├── border.bottom
╰── [window.popup]
GtkTextView has a main css node with name textview and style class .view,
and subnodes for each of the border windows, and the main text area,
with names border and text, respectively. The border nodes each get
one of the style classes .left, .right, .top or .bottom.
A node representing the selection will appear below the text node.
If a context menu is opened, the window node will appear as a subnode of the main node.
Accessibility
GtkTextView uses the [enum@Gtk.AccessibleRole.text_box] role.