I am using ipywidgets in a jupyter notebook and am trying to insert text into a Text box. I have code that will append the appropriate text to the end, but I would like it to insert at the current text cursor instead. Here is a mock up of what a currently have:
from ipywidgets import Button,Text a = Text(description='text', disabled=False) b = Button(description='Awesome', disabled=False) def on_button_clicked(b): a.value+=b.description b.on_click(on_button_clicked) display(a,b)
How do I get the caret position of the ipywidgets Text box?