delight-im / HTML-Sheets-of-Paper

Word processor in your browser using HTML and CSS (for invoices, legal notices, etc.)
https://delight-im.github.io/HTML-Sheets-of-Paper/
MIT License
1.22k stars 142 forks source link

page break on tag ol #15

Open aditsheli opened 2 years ago

aditsheli commented 2 years ago

bug appear when js function try to page break tag li in ol, any solution?

ocram commented 2 years ago

Thanks! Could you share a screenshot of the (unexpected) result? And perhaps the code excerpt used to create this?

aditsheli commented 2 years ago
bug

like this sir, thank you in advance for your reply

ocram commented 2 years ago

Thanks, that’s helpful.

Could it be that you are trying to use a manual page break like <div class="page-break"></div>, or just any element with class="page-break", somewhere in there?

The JavaScript adjustments – so far – run on <p> only, so <ul> and <ol> should not be split up.

ocram commented 2 years ago

The JavaScript adjustments are now run on <ul> and <ol> as well, but still not within those elements. Perhaps this fixes the problem. Changed in https://github.com/delight-im/HTML-Sheets-of-Paper/commit/c48148cf8a6a33c12559dd7d7665988f61175f92 .