Excuse me, I cannot tell how document.GetLine() can help. In order to call GetLine, I have to know the line numbers of the selected text, which seems to stray away from my topic.

This issue is not urgent. I can wait until next EmEditor release when you add a document property to tell current document’s return method.