Overview
Ashton is a versatile library designed for iOS, macOS, and visionOS platforms that simplifies the conversion of NSAttributedStrings to HTML and back. Developed by IdeasOnCanvas, the same team behind the popular MindNode app, Ashton offers a robust solution for developers needing to manage rich text formatting. The latest version, Ashton 2.0, is a complete overhaul that not only enhances performance but also maintains compatibility with previous versions, ensuring a smooth transition for existing users.
The library stands out with its comprehensive support for various NSAttributedString.Key attributes, allowing developers to easily retain essential formatting when converting between NSAttributedStrings and HTML. With a strong focus on testing, Ashton boasts over 90% test coverage, giving users confidence in its reliability and functionality.
Features
- Comprehensive Attribute Support: Ashton supports key attributes such as background color, foreground color, underline style, and more, enabling detailed text formatting.
- Streamlined HTML Handling: Converts NSAttributedStrings into well-structured HTML using only essential tags like span, p, and a, keeping the output clean and efficient.
- Improved Performance: The recent rewrite in Swift enhances efficiency, reducing loading times and improving overall responsiveness.
- Strong Testing Framework: With a test coverage exceeding 90%, Ashton ensures reliability, giving developers peace of mind with their implementations.
- Easy Integration: Compatible with Carthage and the Swift Package Manager, Ashton is simple to add to your existing projects with minimal configuration.
- Example Application: Comes with an example app for testing and showcasing the conversion roundtrips between NSAttributedString and HTML, facilitating hands-on experience.
- Custom Attributes Support: Allows developers to use additional custom attributes, enhancing flexibility when dealing with complex formatting needs.