Our DNA is written in Swift

DTRichTextEditor Goes Open Source

Development on DTRichTextEditor had started in 2011, several years before Apple revamped the internals of UITextView to TextKit. I based it on DTCoreText – which had been open source from the start – and added a custom magnifying glass to mimic the one provided by the system. As of today, I am making it Open Source.

Back in 2011, I saw a market for a rich text editing component as there was nothing anywhere to be found to achieve that. With every passing WWDC we could be anxious to see if Apple had finally made it obsolete. But Apple only slightly revamped UITextView in iOS 6 (2012) and more thoroughly replaced the text view innards with TextKit in iOS 7 (2013). But little has changed about rich text in UIKit since then, it is still is missing important features like support for lists and floating images.

A Mild Success

When I started my component business in January 2008 I was doing pretty well selling specialized components. But for the last several years the income from components has all but subsided. DTRichTextEditor was the only component that kept selling a few licenses every now and then. I attribute this to the above mentioned shortcomings of UITextView.

Over it’s lifetime so far, 86 clients bought commercial licenses for using the rich text editor component in their app store apps, some to get support for lists, some for inline graphics. The most famous being Mailchimp who used it in their iPad app. But even those occasionally sold licenses were far in between.

Even though this number of sold licenses might sound much it is nowhere near enough to pay for the endless hours of work I spend on it. Let alone the work that came from several volunteers who received free licenses for the editor in exchange for their contributions.

The Support Problem

Supporting such a complex component would probably be enough work for a full time developer. The one-off license model for components only works if there is no ongoing support cost. Or if you have enough new sales to pay for ongoing development. Unfortunately I did never have the chutzpah to charge a support subscription, as many other vendors of commercial components do. But this apparently is the only sustainable model.

For a long time I have been wrangling with myself, going back and forth over what to do with this favorite project of mine. It does have some value still, but not enough to be viable commercially. I spent months on it, but I would never make enough to warrant any more investment into it.

So I decided to draw the line here, one week after WWDC 2015. I decided to move DTRichTextEditor and DTLoupe onto GitHub. My top component there is DTCoreText: it is getting contributions and much usage. I am hoping that the Open Source community there will also love to use and contribute to the editor.

The Logistics

Earlier today I cloned the two repos from my private GitLab server onto public GitHub repos: DTRichTextEditor, DTLoupe. The URLs for the git submodules as well as the podspecs were updated to point to the new locations.

The license was changed from a specialized commercial one to my standard 2-clause BSD license. You can use it for free in your apps with attribution, or buy a non-attribution license from me. Or you can contribute and then you can use it for free without attributing it to me. How does that sound?

There are a few pressing issues inherent in the project. DTLoupe has a crashing bug that – I think – comes from an internal racing condition in UIKit using the old-style renderInContext: methods for taking snapshots of view. It is my hope that somebody can figure this out and provide a fix. Or better yet, modernize it to use the newer, faster view snapshotting methods.

I am hoping that people whose app’s value proposition depends on the editor are willing to provide a bounty for the person who provides a fix.

Tagged as: ,

Categories: Updates


  1. hello,I find a problem in ios 9.0. when i use this ‘preferredStatusBarStyle’ method to set status bar color,it appears a problem. when this DTRichTextEditorView becomeFirstResponder ,this status bar will become black,and all the time black,but i want to the set status bar white.My English is very bad, can you understand ? Now i’m very urgent,can you help me to solve this problem . thank you very much!


  1. DTRichTextEditor 1.6.10 | Cocoanetics
  2. DTRichTextEditor 1.6.11 | Cocoanetics