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