RichTextArea: Using TAB
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
您可以尝试richTextArea.getFormatter().insertHTML("t")
,这应该在光标位置插入一个列表,或者用制表richTextArea.getFormatter().insertHTML("t")
替换当前选择。
上一篇: 在RichTextArea或IFrame中的GWT捕获事件
下一篇: RichTextArea:使用TAB