Skip to content

Swift text buffer abstraction to perform TextKit-like mutations and cursor movement.

License

Notifications You must be signed in to change notification settings

CleanCocoa/TextBuffer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TextBuffer

Build Status Platforms Documentation

Text buffer abstractions to power your text editor, in UI or in memory.

Goals

  • In-memory text mutations with an API similar to text views.
  • Consistent behavior across platforms.

Approach

We operate on the abstraction of a Buffer to perform changes.

This enables usage of the declarative API on multiple buffers at once without having to put the text into a UI component to render.

A NSTextView is a buffer. You can use this declarative API to make changes to text views on screen.

You can also use purely in-memory buffers for text mutations of things you don't want to render. This allows you to read multiple files into buffers in your app and use the declarative API to change their contents, while only rendering a single selected file in a text view.

This is harnessed by DeclarativeTextKit.

License

Copyright © 2025 Christian Tietze. All rights reserved. Distributed under the MIT License.

See the LICENSE file.

About

Swift text buffer abstraction to perform TextKit-like mutations and cursor movement.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages