offset property

int offset

Offset in characters of this node relative to parent node.

To get offset of this node in the document see documentOffset.

Implementation

int get offset {
  if (isFirst) return 0;
  var offset = 0;
  var node = this;
  do {
    node = node.previous;
    offset += node.length;
  } while (!node.isFirst);
  return offset;
}