7

I have the following page I'm displaying in WkWebView

<html>
  <textarea name='message' placeholder='Type your message here'/>
</html>

And when entering text to this field, the keyboard displays a normal "Return" key.

I would like to change the label of the return key to "Send" just for this field.

Is that possible in WKWebView?

I'm aware of this answer: How to change keyboard button "Return" to "Search" for input in a UIWebView? But the proposed solution only works in UIWebView.

Community
  • 1
  • 1
jonesjones
  • 477
  • 1
  • 6
  • 13

1 Answers1

1

For someone who is still looking for the answer, we have html enterkeyhint property nowadays: MDN.

<input id="send" enterkeyhint="send" />

<!— or —>

<textarea enterkeyhint="send"></textarea>

Most of the enterkeyhint values (enter/done/go/next/previous/search/send) have their iOS UIReturnKeyType counterparts, and the return key changes to the corresponding appearance.

Send Key Example

Mike Irving
  • 1,480
  • 1
  • 12
  • 20
autodavid
  • 131
  • 2
  • 5