Bugfix: Inserted link is now correct

There was a bug in the functions that adds a hyperlink into the
textarea. No matter which "add"-button was pressed, always the first
link was inserted.