function splitText(node, offset) {
  const tail = node.cloneNode(false);

  tail.deleteData(0, offset);
  node.deleteData(offset, node.length - offset);
  return insertAfter(tail, node);
}
Split text node into two nodes following each other
@param {Text} node
@param {number} offset