Разделить текст на страницы и представить отдельно (HTML5)

Допустим, у нас есть длинный текст, такой как Romeo & amp; Джульетта, и мы хотим представить это в простом читателе (без анимации, только страницы и пользовательский размер шрифта). Какие существуют подходы, чтобы получить это?

Что я придумала до сих пор:

Using css3 columns it would be possible to load the entire text into memory styling it in such a way that a single column takes the size of an entire page. Doing this turned out to be extremely hard to control and requires the entire text to be loaded into memory. Using css3 regions (not supported in any major browser) would constitute the same basic concept as the previous solution, with the major difference that it wouldn't be as hard to control (as every 'column' is a self contained element). Drawing the text on a canvas would allow you to know exactly where the text ends and thus draw the next page based on that. One of the advantages is that you only need to load all the text up to the current page (still bad, but better). The disadvantage is that the text can't be interacted with (Like selecting the text). Place every single word inside an element and give every element a unique id (or keep a logical reference in javascript), next use document.elementFromPoint to find the element(word) which is the last on the page and show the next page onward from that word. Despite this being the only one which seems actually realistic to me, the overhead generated by this has to be immense.

Тем не менее, ни один из них не кажется приемлемым (первый не дал достаточного контроля, чтобы даже заставить его работать, второй еще не поддерживается, третий труден и без выделения текста, а четвертый дает смешные накладные расходы), поэтому любые хорошие подходы я еще не задумывались или способы решения одного или нескольких недостатков упомянутых методов (да, я знаю, что это довольно открытый вопрос, но чем он более открыт, тем выше вероятность получения каких-либо соответствующих ответов)?

Ответы на вопрос(5)

Ваш ответ на вопрос