I have on UIWebView
in that i am allowing editing at runtime.
Now when i click on UIWebView
then iPad keyboard opens for writing,
now my re
I done my work by javascript like this...
In HTML file
function returnEnterPress(e){
var key;
if(window.event)
key = window.event.keyCode; //IE
else
key = e.which; //firefox
// ENTER KEY MUNBER IS 13 // KD
if(key == 13)
{
window.location.href = 'enterClicked/0';
}
else
{
var range = window.getSelection().getRangeAt(0).endOffset;
if(range == 0)
{
window.location.href = 'enterClicked/'+range;
}
}
return true;
}
In my Objective-c Code
- (BOOL)webView:(UIWebView *)webView shouldStartLoadWithRequest:(NSURLRequest *)request navigationType:(UIWebViewNavigationType)navigationType{
if([[[request URL] absoluteString] rangeOfString:@"enterClicked"].location!=NSNotFound) // When "enterClicked" found
{
//Do your desired work
return NO;
}
}