Releases: Cocoanetics/DTCoreText
Release list
DTCoreText 2.1.0
DTCoreText 2.1.0 is the first feature release built on the Swift 2.0 foundation — and it's a big one. It brings full HTML table support, real CSS floats, native iOS 27 TextKit bridging, CSS border-spacing, and a dependency graph trimmed from five packages down to one.
That's ~8,600 lines of new code across 5 pull requests since 2.0.0.
✨ Highlights
- 📊 HTML tables — a full
NSTextTable-compatible model with real grid layout, drawing, and HTML round-trip - 🌊 CSS
float: left/rightfor images and blocks, with text wrapping andclear - 🍏 iOS 27 ready — tables and text blocks bridge to the native UIKit
NSTextTableclasses and lay out in TextKit - 🎯 CSS
border-spacingon tables, with full round-trip support - 📦 One dependency instead of five — DTCoreText now depends only on XMLKit
📊 HTML Table Support (#1318)
DTCoreText now renders HTML tables end to end — parsing, grid layout, drawing, and HTML round-trip — built on a model that mirrors the NSTextBlock / NSTextTable / NSTextTableBlock API so it can hand off to the native classes on iOS 27 (see below).
- Parsing of
table,tr,td,th,thead,tbody,tfoot,caption, andcol/colgroup, producing the same structure as the native macOS HTML importer. - Real grid layout: automatic column sizing, explicit and percentage widths,
colspan/rowspan, vertical alignment with true first-baseline support, justified cell text, and recursively nested tables. - Styling: per-edge borders (solid / dashed / dotted / double), background colors on table, row and cell,
cellpadding/cellspacing,border-collapse,empty-cells,table-layout, and thewidth/min-width/max-widthfamily. - Pagination: tables in finite-height frames break row by row across pages.
- Round-trip & SwiftUI:
HTMLWriteremits<table>markup withcolspan/rowspan, and tables survive conversion throughAttributedStringand back — still laying out as a grid.
🌊 CSS Floats (#1319)
float is now a real layout feature instead of a parsed-but-ignored property.
- Floated images sit at the left or right content edge, with paragraph text wrapping around them and reflowing to full width below.
- Floated blocks (
div,span, eventable) become shrink-to-fit or fixed-width columns — including their backgrounds, padding, and nested content. clear: left/right/bothpushes content below earlier floats. Several floats stack side by side and wrap down as space runs out, and a float that doesn't fit moves whole to the next page in paginated frames.- Round-trips through
HTMLWriter(floated images, floated blocks with width, andclear).
🍏 Native iOS 27 Bridging (#1320)
The table model was designed from day one to swap to the native UIKit classes shipping in the iOS 27 SDK — and that handoff is now wired up and verified end to end on the iOS 27 simulator.
TextBlockConverterbridges DT text blocks to nativeNSTextBlock/NSTextTable/NSTextTableBlockon iOS, tvOS, visionOS and Mac Catalyst (gated@available(iOS 27.0, *)), preserving shared table identity across paragraphs.- DTCoreText output can be handed straight to a TextKit view on iOS 27, which lays the tables out natively.
- Xcode 27 compatibility: the existing macOS code now builds against the Xcode 27 SDK changes (text-block enum raw-type change, soft-deprecated edge accessors). Builds clean on both Xcode 26 and 27.
- Drive-by tvOS build fix.
🎯 CSS border-spacing (#1321)
border-spacing is now honored on tables (one- and two-value forms) with browser-correct precedence — border-collapse: collapse forces zero, CSS border-spacing beats the legacy cellspacing attribute — and it survives a full HTML → attributed string → HTML round-trip. Previously any spacing was silently lost on a round-trip.
📦 Leaner Dependencies (#1322)
The resolved dependency graph shrinks from five packages to one: just XMLKit 1.0.1.
- The
HTMLParsermodule was extracted from SwiftText into its own XMLKit package (with full git history); DTCoreText now depends on it directly, semver-pinned (from: 1.0.1). This drops SwiftText, swift-markdown and swift-cmark from the graph. - The swift-docc-plugin dependency was removed — Swift Package Index auto-injects it for hosted docs and Xcode builds the
.docccatalog natively. This also removes SymbolKit and swift-argument-parser. - No source changes —
import HTMLParserresolves to the identical module; onlyPackage.swift/Package.resolvedchange.
✅ Compatibility
- Requirements: iOS 16+, macOS 13+, tvOS 16+ · Swift 6.1 · Xcode 26 (also builds on the Xcode 27 beta).
- Source-compatible with 2.0.0. Swift Package Manager consumers pick up the new XMLKit dependency automatically on resolve.
- Floats behavioral note: rendering a DTCoreText string in a plain
NSTextView/UITextViewshows floated images inline — the wrap happens in DTCoreText's own layout engine.
⚠️ Known Limitations
- Tables: no full min/max-content width negotiation, no RTL column mirroring, table content bypasses
numberOfLinestruncation, and 3D border styles render as solid. - Floats: floats inside table cells are ignored, and a frame of unknown width disables floats.
Full Changelog: 2.0.0...2.1.0
DTCoreText 2.0.0
We are thrilled to announce DTCoreText 2.0!
This release represents a massive modernization of the codebase, entirely rewriting it in Swift, adopting SwiftText for HTML parsing, using native UIKit default styling, supporting SwiftUI AttributedString, and implementing fully structured concurrency.
Read the full announcement here:
https://www.cocoanetics.com/2026/04/dtcoretext-2-0/
Version 1.6.28
- FIXED: Rename isNumeric to keep from clashing with FMCore
- FIXED: Xcode 14.3 warnings
- FIXED: Unit Tests for SPM
- FIXED: C warnings about missing declarations
- FIXED: Undefined symbol when mixing Objective-C++ Code
- FIXED: Crash from calling lowercaseString on an array parsing CSS
- FIXED: Build problems with Xcode 16 due to missing libarclite
Announcement: https://www.cocoanetics.com/2024/09/dtcoretext-1-6-28/
1.6.27
- Changed DTTextAttachment to be a subclass of NSTextAttachment to avoid some crashes.
- Remove the checking of tiled layer in DTAttributedTextContentView.
- Removed unneeded constant causing a warning
- Added support for underline color
- Added ability to pass in a UIFontDescriptor for DTHTMLAttributedStringBuilder
Announcement: https://www.cocoanetics.com/2022/09/dtcoretext-1-6-27/
1.6.26
- FIXED: Some weak support issues
- FIXED: Some warnings
- FIXED: Enabled bitcode
- FIXED: Missing weak for DTAccessibilityElement and view proxy
- FIXED: [Demo] About VC didn't set correct content inset
- FIXED: Select correct fallbackFont with matching traits when multiple are available
- FIXED: Check for default font
- NEW: [Demo] Demonstrate dark/light mode adjustment on About Box
Announcement: https://www.cocoanetics.com/2021/06/dtcoretext-1-6-26/
1.6.25
- FIXED: URLs containing CJK characters are not parsed
- FIXED: iOS 13 openURL crash
- FIXED: References to deprecated classes
- FIXED: Cannot parse CSS with empty font-family
- FIXED: iOS 14 warnings
- NEW: Swift Package Manager Support
Announcement: https://www.cocoanetics.com/2020/08/dtcoretext-1-6-25/
1.6.24
Version 1.6.23
Version 1.6.22
Please read the announcement for a summary of changes to this maintenance release.
Version 1.6.21
- ADDED: Support for
text-indent
- ADDED: Support
widthattribute in percent for text attachments - ADDED: Ability to abort HTML parsing
- ADDED: Archiving
- ADDED: Improved support for macOS
- FIXED: Incorrect file name in import should be
DTCSSStylesheet.h - FIXED: HTML generation with multi-line links
- FIXED: Do not add 'Apple-converted-space' to attributed string when processing custom HTML attributes
- FIXED: Ignore list style shorthands that are not strings
- FIXED: Wrong attributed substring passed to generic custom view when using truncation
- FIXED: Avoid unnecessary drawing of DTAttributedTextContentView if it is being deallocated
- FIXED: Changing properties on
DTCoreTextLayoutFramewould not update layout, resulting in incorrect sizing information being returned
Announcement: https://www.cocoanetics.com/2017/08/dtcoretext-1-6-21/