diff --git a/widget/src/text_editor.rs b/widget/src/text_editor.rs index 63d488684b..a2a186f0f4 100644 --- a/widget/src/text_editor.rs +++ b/widget/src/text_editor.rs @@ -128,6 +128,15 @@ where highlighter_format: to_format, } } + + /// Sets the style of the [`TextEditor`]. + pub fn style( + mut self, + style: impl Into<::Style>, + ) -> Self { + self.style = style.into(); + self + } } /// The content of a [`TextEditor`].