Move select word under cursor to text api module

and add a test for that