pasting text from a text field into a input box adds &nbsp

I am trying to copy text from a text element to an text box element
this is the code
export function textCopyFirstExample_click(event, $w) {
$w(“#descInput”).value = $w(“#descFirstExample”).text ;
$w(“#boxExamples”).hide();

the text box includes text and many &nbsp

Hi,
Where do you get the value from ?
It is likely that you are getting &nbsp from your collection.

If the text field is being populated by a dataset, try getting the item by using getCurrentItem (wix-dataset - Velo API Reference - Wix.com)

Hi,
No, It’s not from a collection.
It’s from a simple text field that, when a user presses on a button, it copies the content of the text file to the text box.
Very very simple but yet doesn’t work