1

I am implementing a text editor using uiwebview for ipad. I am using a simple javascript to Bold Italics and Underline the text.

[webView stringByEvaluatingJavaScriptFromString:@"document.execCommand(\"Bold\")"];

The above code is using for making the text bold.

Now I want to implement cut, copy and paste as well. I am using this code for cut copy and paste.

[webView stringByEvaluatingJavaScriptFromString:@"document.execCommand(\"Cut\")"]; [webView stringByEvaluatingJavaScriptFromString:@"document.execCommand(\"Copy\")"]; [webView stringByEvaluatingJavaScriptFromString:@"document.execCommand(\"Paste\")"]; But its not working. Am I using the wrong command parameter or is there any way to implement it? I understand there is a popup menu which gives all these features but I want to disable this popup menu and want to used of my own.

Thanks

John
  • 11
  • 3

1 Answers1

0

Disabling user selection in UIWebView

here you can find disabling the copy past menu items

Thanks

Community
  • 1
  • 1
Rohit
  • 181
  • 1
  • 10
  • I have disabled the menu items, I want to implement the copy paste into my own button similar to the menu item. – John Aug 29 '12 at 13:42