How to get selected text from label or embedded html?

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

How to get selected text from label or embedded html?

Alexei Vinidiktov
Hello,

I've started working on an web app for learners of English that will allow them to upload texts to the app, read them via the app, and when they encounter an unknown word they will be able to look it up in the built-in dictionary and add it to a special list for later review. 

My app will display rich text to the user and if he/she double-clicks on a word I need to know which word he/she clicked (selected).

1. Which widget should I use for displaying long rich texts with scrolling? It would be best if the text was not editable by the user.
2. How can I get the portion of the text selected by the user?

Thanks.

--
Alexei Vinidiktov

------------------------------------------------------------------------------
Get 100% visibility into Java/.NET code with AppDynamics Lite
It's a free troubleshooting tool designed for production
Get down to code-level detail for bottlenecks, with <2% overhead.
Download for free and get started troubleshooting in minutes.
http://p.sf.net/sfu/appdyn_d2d_ap2
_______________________________________________
qooxdoo-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
Reply | Threaded
Open this post in threaded view
|

Re: How to get selected text from label or embedded html?

Richard Sternagel
Hi Alexei,

there are two widgets which I am aware of:

* TextArea
* HtmlArea

I'm not sure which one fits your demands better, so here is more
information as decision help:

API:
* http://demo.qooxdoo.org/current/apiviewer/#qx.ui.form.TextArea
* http://demo.qooxdoo.org/current/apiviewer/#qx.bom.htmlarea.HtmlArea

Demos:
* http://demo.qooxdoo.org/current/demobrowser/#bom~Selection.html
* http://demo.qooxdoo.org/current/demobrowser/#bom~HtmlArea.html

Manual (in-depth information):
* http://manual.qooxdoo.org/current/pages/widget/textarea.html
* http://manual.qooxdoo.org/current/pages/desktop/ui_html_editing.html

Regards
Richard

------------------------------------------------------------------------------
Get 100% visibility into Java/.NET code with AppDynamics Lite
It's a free troubleshooting tool designed for production
Get down to code-level detail for bottlenecks, with <2% overhead.
Download for free and get started troubleshooting in minutes.
http://p.sf.net/sfu/appdyn_d2d_ap2
_______________________________________________
qooxdoo-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
Reply | Threaded
Open this post in threaded view
|

Re: How to get selected text from label or embedded html?

Alexei Vinidiktov
Thanks Richard. 

I'll be studying those. 


On Mon, Jun 3, 2013 at 6:13 PM, Richard Sternagel <[hidden email]> wrote:
Hi Alexei,

there are two widgets which I am aware of:

* TextArea
* HtmlArea

I'm not sure which one fits your demands better, so here is more
information as decision help:

API:
* http://demo.qooxdoo.org/current/apiviewer/#qx.ui.form.TextArea
* http://demo.qooxdoo.org/current/apiviewer/#qx.bom.htmlarea.HtmlArea

Demos:
* http://demo.qooxdoo.org/current/demobrowser/#bom~Selection.html
* http://demo.qooxdoo.org/current/demobrowser/#bom~HtmlArea.html

Manual (in-depth information):
* http://manual.qooxdoo.org/current/pages/widget/textarea.html
* http://manual.qooxdoo.org/current/pages/desktop/ui_html_editing.html

Regards
Richard

------------------------------------------------------------------------------
Get 100% visibility into Java/.NET code with AppDynamics Lite
It's a free troubleshooting tool designed for production
Get down to code-level detail for bottlenecks, with <2% overhead.
Download for free and get started troubleshooting in minutes.
http://p.sf.net/sfu/appdyn_d2d_ap2
_______________________________________________
qooxdoo-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel



--
Alexei Vinidiktov

------------------------------------------------------------------------------
Get 100% visibility into Java/.NET code with AppDynamics Lite
It's a free troubleshooting tool designed for production
Get down to code-level detail for bottlenecks, with <2% overhead.
Download for free and get started troubleshooting in minutes.
http://p.sf.net/sfu/appdyn_d2d_ap2
_______________________________________________
qooxdoo-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel