Up to date
This page is up to date for Godot 4.2
.
If you still find outdated information, please open an issue.
TextEdit¶
Inherits: Control < CanvasItem < Node < Object
Inherited By: CodeEdit
A multiline text editor.
Description¶
A multiline text editor. It also has limited facilities for editing code, such as syntax highlighting support. For more advanced facilities for editing code, see CodeEdit.
Note: Most viewport, caret and edit methods contain a caret_index
argument for caret_multiple support. The argument should be one of the following: -1
for all carets, 0
for the main caret, or greater than 0
for secondary carets.
Note: When holding down Alt, the vertical scroll wheel will scroll 5 times as fast as it would normally do. This also works in the Godot script editor.
Properties¶
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
focus_mode |
|
|
|
||
|
||
|
||
|
||
|
||
|
||
mouse_default_cursor_shape |
|
|
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
Methods¶
void |
_backspace ( int caret_index ) virtual |
void |
|
void |
|
void |
_handle_unicode_input ( int unicode_char, int caret_index ) virtual |
void |
|
void |
_paste_primary_clipboard ( int caret_index ) virtual |
void |
add_caret_at_carets ( bool below ) |
void |
add_gutter ( int at=-1 ) |
void |
|
void |
adjust_carets_after_edit ( int caret, int from_line, int from_col, int to_line, int to_col ) |
void |
adjust_viewport_to_caret ( int caret_index=0 ) |
void |
|
void |
|
void |
center_viewport_to_caret ( int caret_index=0 ) |
void |
clear ( ) |
void |
|
void |
|
void |
|
void |
delete_selection ( int caret_index=-1 ) |
void |
|
void |
end_action ( ) |
void |
|
get_caret_column ( int caret_index=0 ) const |
|
get_caret_count ( ) const |
|
get_caret_draw_pos ( int caret_index=0 ) const |
|
get_caret_line ( int caret_index=0 ) const |