Skip to content

Commit b444d60

Browse files
add README
1 parent 0f8648e commit b444d60

1 file changed

Lines changed: 39 additions & 0 deletions

File tree

README.md

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
# TextBuffer
2+
3+
[![Build Status][build status badge]][build status]
4+
[![Platforms][platforms badge]][platforms]
5+
[![Documentation][documentation badge]][documentation]
6+
7+
Text buffer abstractions to power your text editor, in UI or in memory.
8+
9+
[build status]: https://github.com/CleanCocoa/TextBuffer/actions
10+
[build status badge]: https://github.com/CleanCocoa/TextBuffer/workflows/CI/badge.svg
11+
[platforms]: https://swiftpackageindex.com/CleanCocoa/TextBuffer
12+
[platforms badge]: https://img.shields.io/endpoint?url=https%3A%2F%2Fswiftpackageindex.com%2Fapi%2Fpackages%2FCleanCocoa%2FTextBuffer%2Fbadge%3Ftype%3Dplatforms
13+
[documentation]: https://swiftpackageindex.com/CleanCocoa/TextBuffer/main/documentation
14+
[documentation badge]: https://img.shields.io/badge/Documentation-DocC-blue
15+
16+
## Goals
17+
18+
- In-memory text mutations with an API similar to text views.
19+
- Consistent behavior across platforms.
20+
21+
22+
## Approach
23+
24+
We operate on the abstraction of a `Buffer` to perform changes.
25+
26+
This enables usage of the declarative API on multiple buffers at once without having to put the text into a UI component to render.
27+
28+
A `NSTextView` is a buffer. You can use this declarative API to make changes to text views on screen.
29+
30+
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.
31+
32+
This is harnessed by [`DeclarativeTextKit`](https://github.com/CleanCocoa/DeclarativeTextKit/).
33+
34+
35+
## License
36+
37+
Copyright © 2025 Christian Tietze. All rights reserved. Distributed under the MIT License.
38+
39+
[See the LICENSE file.](./LICENSE)

0 commit comments

Comments
 (0)