I would suggest you to look at the real Link dialog as that dialog is able to handle all the links without any problems, and what you might be experiencing is a bug in the plugin, not in the editor itself. You can also take a look at the plugin that I uploaded a few days ago as it uses twice the code from the link dialog to generate links and as it is a very simplified version it can help you to find the correct code.
RE: InsertHTML method is duplicating inserted
You can also take a look at the plugin that I uploaded a few days ago as it uses twice the code from the link dialog to generate links and as it is a very simplified version it can help you to find the correct code.