thanks to everyone who answered my query.
I got that part of the add-on working. now, I am trying to add the selected text to a third party application. initially, I was considering to use clipboard to pass the selected text to third party application by just using simple copy and paste. but it doesn't feel quite right to me as it messes up with the clipboard content.
I've already tried this code:
editBox = api.getFocusObject ()
editBox.value = "some text
it's not working.
thanks josephly for forwarding my post to this mailing list.