Skip to main content
Jun 7, 2007 2:11 PM UTC
Answered

Insert text into specific editable region

I can use dom.getEditableRegionList() and dom.getSelectedEditableRegion() to write text into the selected editable region, but I would like to insert text at the start of an editable region called 'mainContent'.
How can I do this?
This topic is closed to new replies. Start a new post to keep the conversation going.
Newsgroup_UserCorrect answer
Inspiring
Jun 7, 2007 3:42 PM UTC
Search for that node by finding its id in the getEditableRegionList()
array, and prepend your text to its innerHTML.

emichael brandt

LeedsJohn wrote:
> I can use dom.getEditableRegionList() and dom.getSelectedEditableRegion() to
> write text into the selected editable region, but I would like to insert text
> at the start of an editable region called 'mainContent'.
> How can I do this?
>
>

1 reply

Newsgroup_UserCorrect answer
Inspiring
Jun 7, 2007 3:42 PM UTC
Search for that node by finding its id in the getEditableRegionList()
array, and prepend your text to its innerHTML.

emichael brandt

LeedsJohn wrote:
> I can use dom.getEditableRegionList() and dom.getSelectedEditableRegion() to
> write text into the selected editable region, but I would like to insert text
> at the start of an editable region called 'mainContent'.
> How can I do this?
>
>
Translate