DTRichTextEditorView a view that combines the richness of DTCoreText with UITextInput to give you the editing capabilities you need to change text editing on iOS forever.
The component is currently in an accelerated availability stage with one commercial pilot app being almost finished. Or put differently this is sort of a BETA stage where you can get access to the component for testing and adding the last few features to it that you need for your own special case of rich text editing.
UPDATE: Now available as time-limited Demo version.
DTRichTextEditorView is fantastic! I was able to implement syntax highlighting behavior in under an hour. Performance is stellar as well. – Illya Busigin
These are the currently implemented features and what is still not in there:
- set the contents of the editor view either from an NSAttributedString or HTML
- move cursor by long pressing, circular loupe
- move selection handles by long pressing or dragging them, rectangular loupe
- change selection with hardware keyboard, cursor keys and change selection holding Shift
- enter text via on-screen or hardware keyboard
- support for entering text that requires marking, e.g. japanese characters
- support for adding images either inline or in their own paragraph
- Auto-Completion implemented (where it suggests a word while you are typing)
- Auto-Correction – NOT YET (where a suspected misspelled word has a red dotted underline)
- Toggling of bold, italic and underlined
- Your own custom views over links, videos or images
- Scrolling capability, the editor is a UIScrollView subclass that does not override the delegate
- Pasteboard, cut/copy/paste plain text, post NSURL or UIImage. Copy rich text to and from the component with the same format that Safari uses: DTWebArchive.
- Context menu. TO ADD: support for your own menu items to show up after selecting text
- Incremental layouting makes sure that the screen refreshes quick even in longer texts
Here is a video demo that I made some time ago. The component has progressed quite a bit since then, but this shows you the basic features.
I wouldn’t try to use this for very long documents yet because there some work still remains to do partial layouting of an attributed string and merging the results into an existing display. But for most regular use cases it should work well.
Price: 500 EUR (How many U.S. Dollars?)
Update June 2nd, 2012: In this hour-long video I show how to integrate the component into a fresh demo app:
Parts Categories: Cocoanetics