/t5/indesign-discussions/copy-and-paste-in-ui-edittext-box/td-p/1108554Nov 10, 2008
Nov 10, 2008
Copy link to clipboard
Copied
I made a script where you input some text in an EditText box and get an XML tag with the same name (after some sanitizing).
In Windows it is ok. In OSX one user reports that if the EditText is filled through copying some text and paste it into the control you get an extra space at the end (no such thing in Windows).
Are there any known Copy and Paste quirks in OSX that I may have overlooked?
Any suggestion about this added extra space? Thank you
/t5/indesign-discussions/copy-and-paste-in-ui-edittext-box/m-p/1108555#M368063Nov 11, 2008
Nov 11, 2008
Copy link to clipboard
Copied
Hi Carlo,
I don't know what's causing this, but you can just use a regex to strip
white spaces from the end of the string. Something like this:
string = string.replace(/\s+$/,"");