Skip to main content
June 7, 2007
Answered

Insert text into specific editable region

  • June 7, 2007
  • 1 reply
  • 332 views
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 has been closed for replies.
Correct answer Newsgroup_User
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
June 7, 2007
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?
>
>