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
testinz
Posts: 173
Registered: ‎09-03-2012
My Device: Blackberry 10

WYSIWYG editor for text area?

In the Remember app, they able to have a small WYSIWYG editor for the text area.

 

How do you do that or is there a way to use TinyMCE, etc... for the text area editor in QML/native?

 

 

Please use plain text.
Developer
peter9477
Posts: 6,473
Registered: ‎12-08-2010
My Device: PlayBook, Z10
My Carrier: none

Re: WYSIWYG editor for text area?

I think TinyMCE or something like it is exactly what they're using there, inside a WebView.

Peter Hansen -- (BB10 and dev-related blog posts at http://peterhansen.ca.)
Author of White Noise and Battery Guru for BB10 and for PlayBook | Get more from your battery!
Please use plain text.
Developer
testinz
Posts: 173
Registered: ‎09-03-2012
My Device: Blackberry 10

Re: WYSIWYG editor for text area?

Interesting.. how do they retrieve the data from webview in order to save it?

I guess you can reference it by ID?
Please use plain text.
Developer
peter9477
Posts: 6,473
Registered: ‎12-08-2010
My Device: PlayBook, Z10
My Carrier: none

Re: WYSIWYG editor for text area?

You should be able to use ids, or any other typical mechanism that you might use in a web page. Communication with the parent Cascades component would be via the navigator.cascades object in JavaScript, and such things as described in https://developer.blackberry.com/native/documentation/cascades/ui/webview/javascript.html

Peter Hansen -- (BB10 and dev-related blog posts at http://peterhansen.ca.)
Author of White Noise and Battery Guru for BB10 and for PlayBook | Get more from your battery!
Please use plain text.
Developer
testinz
Posts: 173
Registered: ‎09-03-2012
My Device: Blackberry 10

Re: WYSIWYG editor for text area?

I almost got it to work.

The problem is the text focus is brokent: a.k.a if I am typing on line 3 and click on the bullet icon, the focus somehow switched to the top line and the bullet is now created on the top line instead of line 3.
Please use plain text.
Developer
peter9477
Posts: 6,473
Registered: ‎12-08-2010
My Device: PlayBook, Z10
My Carrier: none

Re: WYSIWYG editor for text area?

Not sure of the solution to that, but there are Cascades properties on various components that are associated with the "focusPolicy" and such. There's probably a way you can prevent at least the keyboard focus from switching, and probably the touch focus as well.

Or am I confused about where these buttons are? Are they actually inside the WebView as well? If so, that seems to be entirely an issue relating to the HTML/JS side of things, and nothing involving Cascades.

Peter Hansen -- (BB10 and dev-related blog posts at http://peterhansen.ca.)
Author of White Noise and Battery Guru for BB10 and for PlayBook | Get more from your battery!
Please use plain text.