After doing a lot of searching, as best as I can determine, the SwiftUI TextField does not support multiline editing.
Everything I have found suggests that one must wrap a NSTextView inside of a NSViewRepresentable. However, I have yet to find a working solution.
What little progress I have made in getting this to work has at least few problems:
1. When resizing the window vertically, the text jumps from the top of the view to the bottom of the view and back again.
2. If I edit the text and then resize the view, the altered text reverts back to the initial string. It is unclear how to get the variable binding to update when the text is changed.
3. if I change the background of the multiline text view to red and resize the window vertically, there is a lot of flicker as stuff is redrawn.
If the SwiftUI TextField does support multiline editing, understanding how to configure it properly would resolve this issue as well.
I have some test code at:
https://github.com/ericg-xcode-questions/multiline_text_view