Add state type that divides up content into pages

Will this not allow pages that are bigger than `n`? For example, if `start` is at `n*i - 2` (2/3 characters back until the last space) and `end` is at `n*(i+1)`, then the total length will be `n*(i+1) - (n*i - 2) = n + 2`, longer than n.