Google 网上论坛不再支持新的 Usenet 帖子或订阅项。历史内容仍可供查看。

How to change cursor position

已查看 6 次
跳至第一个未读帖子

Alex Furman

未读,
2006年11月20日 10:01:022006/11/20
收件人
Hi, I'd like to add some additional HTML text at the end of a mail in
thunderbird's "compose" window.
I can use the following code

var editor = gMsgCompose.editor;
var html_editor =
editor.QueryInterface(Components.interfaces.nsIHTMLEditor);
html_editor.insertHTML(messageText);

There is only one problem. This code inserts HTML text at current
cursor position,
but I need it at the end of a mail. Actually I have to move cursor at
the end of a mail before call previous code.
But I have no idea how to move a cursor. Could anybody help me?

Best regards, Alex Furman

0 个新帖子