Fixed broken link insertion by closing the dialog _before_ trying to insert the link.
Closing the dialog restores selection. Fixes #124
Inserting a link while not selecting any text does now insert a _new_ link across all browsers (FF, IE 9/10, Chrome). Fixes issue #110
Merge pull request #154 from cemrich/link-plugin

Some issues fixed inside link plugin