Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Native Development

Reply
Developer
borceg
Posts: 671
Registered: ‎03-21-2012
My Device: BlackBerry PlayBook 16GB
My Carrier: Vip

Using WebView as general purpose text editor ?

I couldn't found any sample that shows how to use WebView  as replacement for TextArea (TextArea can't handle large amounts of text, over 1k lines) but I loaded 10k+ lines file to webview and it rocks, scrolling is smooth, no lags or friezes. But I couldn't find anything that relates to text editing, text reflow when it is zoomed(as done in words to go BB10 app), getting text changes etc

 

Any tips are greatly appreciated. 

Please use plain text.
Developer
borceg
Posts: 671
Registered: ‎03-21-2012
My Device: BlackBerry PlayBook 16GB
My Carrier: Vip

Re: Using WebView as general purpose text editor ?

Nobody ?
Please use plain text.
Contributor
CrystalBullet
Posts: 19
Registered: ‎02-14-2013
My Device: Red Z10
My Carrier: WIND Mobile

Re: Using WebView as general purpose text editor ?

You can enable editing in a WebView by putting a <div contenteditable="true"> in the HTML  content, for example:

 

<html>

<div contenteditable="true" style="background-color:#eee9e9;height:1015px;width:752px">

 

</div>

</html>

 

See https://developer.mozilla.org/en-US/docs/HTML/Content_Editable for more details

--
Martin Larochelle
Macadamian
http://bb10ize.me
Please use plain text.