开发者

Editing HTML in UIWebView

开发者 https://www.devze.com 2023-02-17 19:58 出处:网络
I am loading an开发者_如何学编程 HTML file in my UIWebView and displaying it in my app. Now I want to all the user to edit this html in the UIWebView real time (i.e. when he is viewing it in the UIWeb

I am loading an开发者_如何学编程 HTML file in my UIWebView and displaying it in my app. Now I want to all the user to edit this html in the UIWebView real time (i.e. when he is viewing it in the UIWebView). To put it in a different way; Does UIWebView allow editing it's HTML content like a UITextField or UITextView does?


No. It doesn't allow HTML editing.
The closest solution I think of is getting the HTML content and put it in a UITextView but that wouldn't be very user-friendly.


How about split the screen into two view. Web view and text view. Edit text in the text view. When user tap a 'done' button apply the changed text to the web view. Or you can use timer to continuously update web view with the current content of text view.

0

精彩评论

暂无评论...
验证码 换一张
取 消