Text

Elements and attributes can have textual content. The text (and eventually markup) of an element is as a list of one or more children of the node. Text inherits all functionality of Character Data.

Split Text

split-text text offset

The split-text method breaks a text node into two text nodes at a specified offset, keeping both in the document tree as siblings. The original text node then only contains the content up to the offset point. The method takes two arguments: A text node, and an offset at which point to split.