✊🏿 Black Lives Matter. Please consider donating to Black Girls Code today.
⚡️ Concerned about the grid? Kyle Baranko teaches how to predicting peak loads using XGBoost. Register for the August webinar!

Get the cursor position in a dcc.Textarea

Hi, i need to insert text into a textarea where is the cursor position at the moment I click a button for example. I’ve been searching different ways to do this but I dont find any tha help me
Some have any idea of a solution??

No te entendi nada :woozy_face: :thinking:

Perdón, escribí en ingles para que llegue a mas personas.

Básicamente necesito conocer la posición en la que esta el cursor de la barra de escritura en el dcc.Textarea para introducir una palabra en esa misma posición.
Por ejemplo:
En la siguiente frase me gustaría insertar la palabra “matias” donde esta la barra vertical (simulando la barra de escritura)

" Hola | , como estas?" ------> “Hola Matias, como estas?”

Para realizar esto necesito donde fue la ultima posicion en donde la estaba colocada la barra de escritura

No, no, its ok to write in English, I just kitting because I did not understand your point.

I don’t think it’s possible to do what you want, the dcc.Text area hasn’t any property to do that, the value property has the entire text that the user has entered, but no reference about the last possition of the cursor in it. :woozy_face:

But this doesn’t mean that you can do what you want to acomplish, I’m sure that there are others ways to get it using others components.

Lets try to explain your final gol, for example: “I want that if the user do this… then it receives a message saying something…”