Paragraph Text Split
Posted on 2006-04-06
Ok so here it is... the behemoth of a question : )
1. I have a string which contains an unspecified amount of text... say 6 paragraphs...
2. I'm going to be displaying this paragraph in a table in a popup window (the table could be any height)
3. The text will not be in a scrollable window... it will be displayed directly on the page.
4. If the text is to long for the current page, then there should be a next page
5. If there is another page - next page, if previous page - previous page
6. If one paragraph finishes and another paragraph is still to be displayed but that next paragraph cannot display a min of x lines within the page size then the next paragraph should be displayed on the next page
7. A paragraph should only display on the page if it is able to fit at least x number of lines on the page, or if it is the first paragraph on the page in which case it would display as much of the paragraph it could and then complete it on the next page.
8. The last line of the page should always complete the sentence. IE not splitting the pages in the middle of sentences.
Any one up for the challenge... this should be a class or function...