Tuesday, 17 May 2022

How to get mouse selected text from Jupyter text widget?

I want to capture the mouse selected text from a jupyter text widget .

import ipywidgets as widgets
text = widgets.Textarea(
    value='Hello World',
    description='String:',
    disabled=False
)
display(text)

In the following example when World is selected and left click is complete then I want to capture the text highlighted .

enter image description here



from How to get mouse selected text from Jupyter text widget?

No comments:

Post a Comment