Swift package · v0.1.0
KLRichTextEngine
Keep rich-text documents editable without losing their authored structure.
A document codec and editor-routing layer for attributed text, checklist semantics, runtime metadata, and safe reconciliation of unsupported values.
Functions
- Structured rich-text document encoding
- Editable attributed-string conversion
- Checklist semantics and runtime metadata
- Safe reconciliation for unsupported payloads
Not included
It models and reconciles rich text. Persistence, editor presentation, undo policy, and application navigation remain with the integrating application.
Install with SwiftPM
Package.swiftSwift
.package(url: "https://github.com/KoenLee1023/KLRichTextEngine.git", from: "0.1.0")Usage
Integration exampleSwift
let editable = try codec.editableAttributedString(from: value)
let document = try codec.document(from: editable, reconciling: previous)API documentation
Open the complete API documentation.RichTextDocumentCodecConverts authored documents and attributed strings while preserving supported structure.
RichTextChecklistCodecReconciles checklist edits without discarding authored values.
RichTextEditorRoutingRoutes edits through the appropriate document boundary.
Demo apps
Rich Text Editor
Edit formatted text and inspect the resulting document model.
Checklist Lab
Compare checklist edits, metadata, and unsupported-value handling.