@hamdifem – I really recommend using the available DOM documentation when writing a script:
The chm files you can download from there are searchable.
So, if you look up insertionPoint from this, you can see, that removing an insertionPoint is done by the method remove(). A method is nothing but a predefined function. It can take none, one or more arguments inside the ().
In case of remove() you simply cannot exchange one object class (the InsertionPoint) for another object class (your String). So you have to assign new contents to that insertionPoint.
If you want to remove a character use the Character class and do a remove() on that character.
Or, and I always wondered why the InsertionPoint class has a remove() method, you can remove one or more characters by a range of insertionPoints (now remove() makes sense for the InsertionPoint class!):
Since I do not know, what you have selected (a single insertion point?, one or more characters?) I cannot tell more.
Btw. What do you mean by "add a point"?
without selecting a character (The point where) next space I want to delete