Not really sure what’s causing this, I tried running this sample app which demonstrates the usage of Interface API, and I could able to insert content to the editor perfectly. @Bala_kumar can you try the same and look at the code.
If you refer to the documentation for this interface method, you will note that -
By default, the text is appended at the current cursor position. The optional replace parameter, which is boolean, can be used to replace the existing content or add to it.
So the behaviour you notice, that is the text is appended to the existing test value when the button is clicked the 2nd time, is expected. Consider using the replace parameter if you wish to overwrite the existing text in the window.