views:

206

answers:

2

Hello Gurus,

I have a web application that uses TinyMce to allow rich text editing. Some of my customers are desperate to get it to work on iPad (which doesn't support contenteditable and therefore TinyMce doesn't work)

At the moment the only choices I have are:

  • Disallow rich text editing when i detect the browser is iPad. This is not much of a solution because my app relies heavily on rich text editing
  • Wait for iPad to support contentEditable
  • Write my own iPad app. This isn't really workable because it's a big complex app with loads of HTML and javascript and I would have to rewrite it all
  • Use another browser. As far as I know none of the other browsers support contenteditable either.

I'm really keen to find some workable solution. is there such thing as a rich text editor that doesn't require contenteditable? or does anyone have a clever idea I hadn't thought of?

Thanks in advance

Andy

+1  A: 

Write my own iPad app. This isn't really workable because it's a big complex app with loads of HTML and javascript and I would have to rewrite it all

Not necessarily true. You can embed the working part of your web app in a UIWebView component, which is basically Safari embedded in your app, and handle the not working part in the app (providing content). It would require work for sure, but maybe a lot less than rewriting the whole app for iPad.

jv42
Thanks JV this sounds like a really interesting option. What I would need is some way for the web page running in the UIWebView to invoke the host application in some way (so that I can launch a native rich-text editing component). do you know if there is any way to do this?
Andy
The UIWebViewDelegate protocol allows you to hook some ObjectiveC before the WebView handles a load request. That could do what you want. On the other side, UIWebView supports executing some Javascript from the ObjectiveC code, very useful too.
jv42
FYI someone pointed me at this link:http://www.codingventures.com/2008/12/using-uiwebview-to-render-svg-files/ under "Javascript communicating back with Objective-C code" it shows a workaround for invoking some Objective C code from JS. Unfortunately it looks like this project is being delayed so I won't be getting to play with iPad apps for the time being but I thought the link might be useful for anyone else interested in the same area
Andy
Yes that was the method I was suggesting above about the delegate, used (and abused) to pass some info back and forth.
jv42
A: 

At to this point there are no browsers on the ipad that will allow RTE. Actually there is only one phone giving full browser support for RTE (sry, i forgot the name of the phone). Therefor, i think you almost showed all possible solutions (jv42's suggestion excluded) yourselve.

Thariama