Skip to content

ChimeHQ/Textbook

Build Status Platforms Documentation Matrix

Textbook

Easier NSTextView/UITextView and SwiftUI

Installation

dependencies: [
    .package(url: "https://github.com/ChimeHQ/Textbook", branch: "main")
],

Usage

BaseTextView

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

Contributing and Collaboration

I would love to hear from you! Issues or pull requests work great. A Matrix space is also available for live help, but I have a strong bias towards answering in the form of documentation.

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.

Releases

No releases published

Sponsor this project

 

Packages

No packages published

Languages