Hi, i’m building a site which centers around a book. The pages each have a textfield with a constrained size. What i’m trying to do is have the text load, and then have the text wrap from one field to the next when it reaches the end of the page, and continue on until the end of the text string. So depending on the size of the text string there could be 4, 5 however many pages.
I realize i could just substr() it by 500 characters or so, but tne tricky thing is having the string break on a space character, so that when the text goes from one page to the next it wont end in the middle of a word, and also so that its essentially close to the end of the page when it breaks, like you’d expect in a real book.
Does anyone know of a method to overflow text from one field to the next without breaking words up?
Are there also any methods of counting the character capacity of a textfield based on its static size?
I’m pulling the text blocks out of a database, so now i’m trying to do this with php, but if i could just retrieve the whole string and use an AS method that would be fine too.
thanks,
cc