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.

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

AutowrapMode

autowrap_mode

3

bool

caret_blink

false

float

caret_blink_interval

0.65

bool

caret_draw_when_editable_disabled

false

bool

caret_mid_grapheme

false

bool

caret_move_on_right_click

true

bool

caret_multiple

true

CaretType

caret_type

0

bool

context_menu_enabled

true

bool

deselect_on_focus_loss_enabled

true

bool

drag_and_drop_selection_enabled

true

bool

draw_control_chars

false

bool

draw_spaces

false

bool

draw_tabs

false

bool

editable

true

FocusMode

focus_mode

2 (overrides Control)

bool

highlight_all_occurrences

false

bool

highlight_current_line

false

String

language

""

bool

middle_mouse_paste_enabled

true

bool

minimap_draw

false

int

minimap_width

80

CursorShape

mouse_default_cursor_shape

1 (overrides Control)

String

placeholder_text

""

bool

scroll_fit_content_height

false

int

scroll_horizontal

0

bool

scroll_past_end_of_file

false

bool

scroll_smooth

false

float

scroll_v_scroll_speed

80.0

float

scroll_vertical

0.0

bool

selecting_enabled

true

bool

<