summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--doc/classes/TextEdit.xml3
-rw-r--r--scene/gui/text_edit.cpp1
2 files changed, 4 insertions, 0 deletions
diff --git a/doc/classes/TextEdit.xml b/doc/classes/TextEdit.xml
index 0af11eec31..3cb33c78c0 100644
--- a/doc/classes/TextEdit.xml
+++ b/doc/classes/TextEdit.xml
@@ -465,6 +465,9 @@
</method>
</methods>
<members>
+ <member name="text" type="String" setter="set_text" getter="get_text">
+ String value of the [TextEdit].
+ </member>
<member name="readonly" type="bool" setter="set_readonly" getter="is_readonly">
If [code]true[/code] read-only mode is enabled. Existing text cannot be modified and new text cannot be added.
</member>
diff --git a/scene/gui/text_edit.cpp b/scene/gui/text_edit.cpp
index a568b6fab0..02b203b5e3 100644
--- a/scene/gui/text_edit.cpp
+++ b/scene/gui/text_edit.cpp
@@ -4971,6 +4971,7 @@ void TextEdit::_bind_methods() {
ClassDB::bind_method(D_METHOD("menu_option", "option"), &TextEdit::menu_option);
ClassDB::bind_method(D_METHOD("get_menu"), &TextEdit::get_menu);
+ ADD_PROPERTY(PropertyInfo(Variant::STRING, "text", PROPERTY_HINT_MULTILINE_TEXT), "set_text", "get_text");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "readonly"), "set_readonly", "is_readonly");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "highlight_current_line"), "set_highlight_current_line", "is_highlight_current_line_enabled");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "syntax_highlighting"), "set_syntax_coloring", "is_syntax_coloring_enabled");