add API method for returning contents to textarea on JS call