Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Editing HTML content in native iOS app

Is there a good way to allow editing of HTML content in a native iOS application?

For example, if you are building an email app and want to allow replying to an email and editing the original message. It needs to pretty much support any valid HTML, including images, styles, etc.

I've tried a contenteditable UIWebView as well as using NSAttributedString with a UITextView, but neither are good solutions - UIWebView does not have any way to manage content or cursor position, and UITextView will not render HTML that includes images and other elements.

like image 827
ebi Avatar asked Feb 06 '14 02:02

ebi


1 Answers

Unless you're willing to show a textarea with html code, I think the only way is to go for a mobile rich text editor with a toolbar and stuff, because contenteditable uses shortcuts like crtl + b right?!

Check out these two guys for mobile browsers:

http://mindmup.github.io/bootstrap-wysiwyg/

http://imperavi.com/redactor/

UPDATE

For native apps you may try:

http://www.omnigroup.com/omnioutliner

https://github.com/aryaxt/iOS-Rich-Text-Editor

http://www.cocoanetics.com/parts/dtrichtexteditor/

https://github.com/enormego/EGOTextView

like image 142
kbtz Avatar answered Oct 05 '22 12:10

kbtz