How can I read a text field?

I want to get the string of a text (not an input field!) in javascript. The text is connected with a dataset.
How can I do this?

Check out the API here: https://www.wix.com/velo/reference/$w/text/text

let value = $w("#textElement").text 

thank you