johnfactotum / foliate-js

Render e-books in the browser
https://johnfactotum.github.io/foliate-js/reader.html
MIT License
318 stars 43 forks source link

Render the whole chapters on one page? #6

Open theowenyoung opened 1 year ago

theowenyoung commented 1 year ago

Hi,

Can I render the whole epub pages at one page?

johnfactotum commented 1 year ago

If you mean continuous scrolling, that's not supported. Currently, the paginator only supports showing one chapter at a time.

theowenyoung commented 1 year ago

Thanks. Maybe not continuous scrolling, there is an example: https://1paragraph.app/

this tool can render the whole book at a time.

johnfactotum commented 1 year ago

Well, if you want to render everything on the same page at once, you can manually iterate through each object in the sections array, call load() , and fetch the blob URLs. This will give you the full HTML of each chapter. Then you should be able to append all the content onto the page.

theowenyoung commented 1 year ago

Thanks! I'll try it.