insert text into a textarea at cursor position

529 views
Skip to first unread message

ekaldany

unread,
Apr 14, 2009, 5:24:32 PM4/14/09
to Google Web Toolkit
So it's pretty clear that this is achievable in a regular webpage with
a javascript function... but how do I insert text into a textarea at
cursor position in GWT?

We have it functional in all browsers except IE... it adds like 3000
character spaces and inserts the text in a random spot in the
textarea.

To explain the greater functionality here, the user is filling out a
form, then inserting portions of it via links of section names into
the text area to create a customized note.

Any help?

Vitali Lovich

unread,
Apr 15, 2009, 1:19:44 AM4/15/09
to Google-We...@googlegroups.com
If you have the Javascript code, it's going to be pretty much the exact same code in GWT.

Salvador Diaz

unread,
Apr 15, 2009, 5:50:50 AM4/15/09
to Google Web Toolkit

ekaldany

unread,
Apr 15, 2009, 9:27:28 AM4/15/09
to Google Web Toolkit
Thanks guys, I will study the links and post up if I continue to have
trouble.

On Apr 15, 5:50 am, Salvador Diaz <diaz.salva...@gmail.com> wrote:
> You should be able to do that with these methods from TextArea:
>
> http://google-web-toolkit.googlecode.com/svn/javadoc/1.5/com/google/g...()http://google-web-toolkit.googlecode.com/svn/javadoc/1.5/com/google/g...)http://google-web-toolkit.googlecode.com/svn/javadoc/1.5/com/google/g...)
Reply all
Reply to author
Forward
0 new messages