I have added a custom file selector plugin for FCKeditor and inserting of a new link works fine. The problem is that I should be able to detect when the current cursor location or selection is a link already. At the moment this causes nested anchor tags instead of updating the existing link.
The FCKEditor JavaScript API is not too helpful: "Working with the selection in the editor: Use the Selection Object"
I would be happy with examples related to this or documentation about selection object. Thank you!