Easier NSTextView/UITextView and SwiftUI
dependencies: [
.package(url: "https://github.com/ChimeHQ/Textbook", branch: "main")
],
This is an NSTextView
subclass that aims for an absolute minimal amount of changes. Things are allowed only if they are required for correct functionality. It is intended to be a drop-in replacement for NSTextView
, and should maintain compatibilty with existing subclasses. Behaviors are appropriate for all types of text.
- Additional routing to
NSTextViewDelegate.textView(_:, doCommandBy:) -> Bool
:paste
,pasteAsRichText
,pasteAsPlainText
- Hooks for
onKeyDown
,onFlagsChanged
,onMouseDown
- Configurable selection notifcation delivery via
continuousSelectionNotifications
I would love to hear from you! Issues or pull requests work great. Both a Matrix space and Discord are available for live help, but I have a strong bias towards answering in the form of documentation. You can also find me on mastodon.
I prefer collaboration, and would love to find ways to work together if you have a similar project.
I prefer indentation with tabs for improved accessibility. But, I'd rather you use the system you want and make a PR than hesitate because of whitespace.
By participating in this project you agree to abide by the Contributor Code of Conduct.