updateHead = (
  block: BlockNodeRecord,
  targetOffset: number,
  fragment: BlockMap,
): BlockNodeRecord => {
  const text = block.getText();
  const chars = block.getCharacterList();

  // Modify head portion of block.
  const headText = text.slice(0, targetOffset);
  const headCharacters = chars.slice(0, targetOffset);
  const appendToHead = fragment.first();

  return block.merge({
    text: headText + appendToHead.getText(),
    characterList: headCharacters.concat(appendToHead.getCharacterList()),
    type: headText ? block.getType() : appendToHead.getType(),
    data: appendToHead.getData(),
  });
}
Appends text/characterList from the fragment first block to
target block.