# How to make TextView in SwiftUI for macOS

Issue #587

## Use xib

Create a xib called ScrollableTextView, and drag just Scrollable text view as top object

Connect just the textView property

## Conform to NSViewRepresentable

There seems to be a bug that if we have open and close curly braces, any character typed into NSTextView will move the cursor to the end. This is easily fixed with a check in updateNSView