How can I set/insert text to the Reply Editor.

How can I set/insert text to the Reply Editor.

I am building an extension that can generate the response for the ticket and I want to insert the response into the ReplyEditor of user. However, check on this document I can only set the response to the ticket.comment. Is there any API that can help me to achieve that?

I want it to functions the same as the button "Paste to Ticket" in the image below. Please help me.