editor: delete/insert at the edges of a span