Add getSelection and getSelectedText to API