diff --git a/doc/classes/TextEdit.xml b/doc/classes/TextEdit.xml
index b7cf93d672c..bb2d355bf67 100644
--- a/doc/classes/TextEdit.xml
+++ b/doc/classes/TextEdit.xml
@@ -354,6 +354,17 @@
If [code]true[/code], hides the line of the specified index.
+
+
+
+
+
+
+
+
+ Sets the text for a specific line.
+
+
diff --git a/scene/gui/text_edit.cpp b/scene/gui/text_edit.cpp
index 9ee7456d265..b3c021c2a58 100644
--- a/scene/gui/text_edit.cpp
+++ b/scene/gui/text_edit.cpp
@@ -7083,6 +7083,7 @@ void TextEdit::_bind_methods() {
ClassDB::bind_method(D_METHOD("get_line_count"), &TextEdit::get_line_count);
ClassDB::bind_method(D_METHOD("get_text"), &TextEdit::get_text);
ClassDB::bind_method(D_METHOD("get_line", "line"), &TextEdit::get_line);
+ ClassDB::bind_method(D_METHOD("set_line", "line", "new_text"), &TextEdit::set_line);
ClassDB::bind_method(D_METHOD("center_viewport_to_cursor"), &TextEdit::center_viewport_to_cursor);
ClassDB::bind_method(D_METHOD("cursor_set_column", "column", "adjust_viewport"), &TextEdit::cursor_set_column, DEFVAL(true));