Capturing TAB-key in RichTextArea

104 views
Skip to first unread message

Marcus Franzen

unread,
Jan 17, 2012, 9:45:31 PM1/17/12
to Google Web Toolkit
Hi!

I would like to use the tab-character within a RichTextArea in GWT.
The usual behavior of pressing the tab-key is to switch the focus to
the next element. I am trying to capture the TAB-Key when typing text
in a RichTextArea (via KeyDownHandler) and insert the tab character at
the current cursor position. Sadly the RichTextArea has no
getCursorPos/setCursorPos like the TextArea has.

Any ideas?

Many thanks!

Marcus

Ice13ill

unread,
Jan 18, 2012, 4:03:27 AM1/18/12
to Google Web Toolkit

Marcus Franzen

unread,
Jan 18, 2012, 9:40:00 AM1/18/12
to Google Web Toolkit
Thanks for your link, I have already seen this one and it works only
for a TextArea. You don't have the cursor position in a RTA. I've
found something else, maybe that will work for the cursor position:
http://code.google.com/p/gwt-selection/

On 18 Jan., 10:03, Ice13ill <andrei.fifi...@gmail.com> wrote:
> Maybe this will help:
>
> http://albertattard.blogspot.com/2009/11/capturing-tab-key-in-gwt-tex...
Reply all
Reply to author
Forward
0 new messages