Attention: Here be dragons
This is the latest
(unstable) version of this documentation, which may document features
not available in or compatible with released stable versions of Godot.
Checking the stable version of the documentation...
TextEdit¶
Inherits: Control < CanvasItem < Node < Object
Inherited By: CodeEdit
Multiline text editing control.
Description¶
TextEdit is meant for editing large, multiline text. It also has facilities for editing code, such as syntax highlighting support and multiple levels of undo/redo.
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 |
|
get_caret_wrap_index ( int caret_index=0 ) const |
|
get_first_non_whitespace_column ( int line ) const |
|
get_first_visible_line ( ) const |
|
get_gutter_count ( ) const |
|
get_gutter_name ( int gutter ) const |
|
get_gutter_type ( int gutter ) const |
|
get_gutter_width ( int gutter ) const |
|
get_h_scroll_bar ( ) const |
|
get_indent_level ( int line ) const |
|
get_last_full_visible_line ( ) const |
|
get_last_full_visible_line_wrap_index ( ) const |
|
get_last_unhidden_line ( ) const |
|
get_line_background_color ( int line ) const |
|
get_line_column_at_pos ( Vector2i position, bool allow_out_of_bounds=true ) const |
|
get_line_count ( ) const |
|
get_line_gutter_icon ( int line, int gutter ) const |
|
get_line_gutter_item_color ( int line, int gutter ) const |
|
get_line_gutter_metadata ( int line, int gutter ) const |
|
get_line_gutter_text ( int line, int gutter ) const |
|
get_line_height ( ) const |
|
get_line_width ( int line, int wrap_index=-1 ) const |
|
get_line_wrap_count ( int line ) const |
|
get_line_wrap_index_at_column ( int line, int column ) const |
|
get_line_wrapped_text ( int line ) const |
|
get_local_mouse_pos ( ) const |
|
get_menu ( ) const |
|
get_minimap_line_at_pos ( Vector2i position ) const |
|
get_minimap_visible_lines ( ) const |
|