When we select some text:
and then press CMD/CTRL+K to open the window to add the link:
and we search for a topic:
I think the selected text should be kept, otherwise, it doesn’t make much sense to select the text if we are going to lose it:
Either keep the selected text by default, or give us the option to either use the selected text or the topic title.