Insert Node at end of range

382 views
Skip to first unread message

buzzard

unread,
May 24, 2011, 9:30:57 PM5/24/11
to rangy
I have what I'm guessing is a basic question: On the core demo page
there is functionality for inserting a node at the beginning of a
range. Can anyone provide me with the basics on how to insert a node
at the end of the range?

Thanks!

Tim Down

unread,
May 25, 2011, 4:54:06 AM5/25/11
to ra...@googlegroups.com
Call collapse(false) on the range (or a copy of it created using
cloneRange()) first:

range.collapse(false);
range.insertNode(node);

Tim

Reply all
Reply to author
Forward
0 new messages