I need to add line breaks in the positions that the browser naturally adds a newline in a paragraph of text.
For example:
This is some very long tex
I would suggest wrapping all spaces in a span tag and finding the coordinates of each tag. When the Y-value changes, you're on a new line.