I use this native javascript method in GWT to insert text at the cursor position of a RichTextArea. It works sometimes, but it often gives me this error message: "refNode.insertData is not a function. It seems to happen when the cursor is on an empty line.
public native void insertText(String text, int pos) ;
So I need to debug this javascript and don't know where to start. I know very little about javascript and got this method, which I use from the question stack. I get the cursor position from another native method that I copied from this question .
I read that this error is due to the fact that refNode is not the correct type of object. I figured that someone knows what type of object it really is, and can help me deal with this situation.
source share