Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Split very long content into pages #234

Closed
SoFo12 opened this issue Mar 2, 2020 · 4 comments
Closed

Split very long content into pages #234

SoFo12 opened this issue Mar 2, 2020 · 4 comments

Comments

@SoFo12
Copy link

SoFo12 commented Mar 2, 2020

I have multiple html files with very long text which I would like to split into pages to make it easier to read and navigate. Here's an example of this:
image
Can I change the widget to implement similar? And scrollview does not fit.

@Sub6Resources
Copy link
Owner

In version 1.0.0-pre.1, you could use the customRender callback to create page breaks.

@SoFo12
Copy link
Author

SoFo12 commented Mar 5, 2020

In version 1.0.0-pre.1, you could use the customRender callback to create page breaks.

can you give an example please?

@Sub6Resources
Copy link
Owner

You could insert a custom element, say <pagebr /> into your html code whenever you want a page break, and then using the customRender callback, you could make that widget insert several newlines and/or a Divider. Alternatively, you could wrap each page in a <page>, </page> tag and use the style callback to add border/margins to each page.

See https://github.com/Sub6Resources/flutter_html/wiki/All-About-customRender and https://github.com/Sub6Resources/flutter_html/wiki/Style for more information about the customRender and style attributes in this package.

@erickok
Copy link
Collaborator

erickok commented Feb 8, 2021

I suggest you eather split your html before feeding it to Html (and put multiple of them in a list of some kind) or if you must you can also use customRender.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants