Replacing NSTextView text programmatically without affecting its style and format

In the previous post I discussed the addition of Dynamic Date parsing to MarsManaged. In a nutshell: actions containing certain keywords (i.e. today, tomorrow, next month) are automatically converted to target dates.  High level, the flow is as follows: Nice right? Well, I quickly discovered an unexpected surprise: the TextView format was being lost when the keyword …

Making an editable Label with SwiftUI

Let’s say you’re showing the user a list of sidebar selectable categories. These categories appear on the sidebar as SwiftUI Labels and, depending on the one selected, the app will show one view or another. So far, so good… But what if the user would like to rename one of the categories? Ideally Label would have …