When you select a word by double click in browsers, it usually selects the word and a space after it.
How I could make the selection capture only the word, without the space?
Note: The behavior I am talking about is in Google translate, go there, search for the translation of any word, then in the Examples section for example, select any word, you will find it selects exactly the word without the space after it.
Update
I was asking because we were developing an editor based on slatejs, and we were adding some marks dynamically at the beginning, but when the user try to select the word to edit the mark, it doesn't get selected because the selection should be on the word only.