Text Editor
Text Editor
In this example, the text editor renders gray text using the `13`
point Helvetica Neue font with `5` points of spacing between each line:

You can define the styling for the text within the view, including the
text color, font, and line spacing. You define these styles by applying
standard view modifiers to the view.
When you create a custom view, Swift infers this type from your
implementation of the required `body` property.
A view for editable text.
You create a text field with a label and a binding to a value. If the
value is a string, the text field updates this value continuously as the
user types or otherwise edits the text in the field. For non-string types,
it updates the value when the user commits their edits, such as by pressing
the Return key.
The text field also allows you to provide two closures that customize its
behavior. The `onEditingChanged` property informs your app when the user
begins or ends editing the text. The `onCommit` property executes when the
user commits their edits.

SwiftUI provides a default text field style that reflects an appearance and
behavior appropriate to the platform. The default style also takes the
current context into consideration, like whether the text field is in a
container that presents text fields with a special style. Beyond this, you
can customize the appearance and interaction of text fields using the
``View/textFieldStyle(_:)`` modifier, passing in an instance of
``TextFieldStyle``.
[textfield-style ->]
``TextField`` can be styled with the ``View/textFieldStyle(_:)`` modifier.

[<-]
The ``TextFieldStyle`` protocol and ``View/textFieldStyle(_:)`` modifier
provide helpful functionality to implement a well styled ``TextField``.