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.

Platforms
iOS 17+ · macOS 14+
Toolchain
Swift 6.0+
License
MIT
Dependencies
None

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)
RichTextDocumentCodec

Converts authored documents and attributed strings while preserving supported structure.

RichTextChecklistCodec

Reconciles checklist edits without discarding authored values.

RichTextEditorRouting

Routes edits through the appropriate document boundary.

Demo apps

Checklist Lab

Compare checklist edits, metadata, and unsupported-value handling.