-
Notifications
You must be signed in to change notification settings - Fork 4.6k
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
Add support for lists in from html plugin #249
Conversation
Actually I figured out the bullets :) |
#140 related |
Thanks. Can you post some screenshoot on how it looks or some live example? |
Hi, sure I will add live demo tommorow. Thanks. |
Hi, heres the demo: |
This is exactly what I need for a project I'm currently working on. I realise that this might not be merged etc. straight away...so All I need to know is how I can build and run the script based on your fork @danielhusar ? :) Can't seem to find some documentation about that...not sure if it's just a matter of forking and then running the build.sh? |
Hi, You can fork my fork and run build.sh and it should work :) You can also pick up jsPDF directly from the demo: https://dl.dropboxusercontent.com/u/11755646/jspdf.js Or if you want to do it manually all you need to do is replace DrillForContent function with function from the file above, and var listCount = 1; variable thats above it. |
Hi there, I was also facing the same issue, this JS also fixed the multi-page generation. Thanks in advance. |
@danielhusar Thanks! Did not notice the "external script" stuff on the jsfiddle site. Got it and seems to be working. However it seems I have an issue with ordered lists not showing any numbers. But that may be something in my end. Will report back tomorrow. Thanks again. |
Nice work Daniel, only problem i've found is that you use static-size bullets, so they look wrong depending the font size used. Example: http:https://jsfiddle.net/RbdF8/3/ Ideally you should calculate their size from the line-height and place them in the middle of the line. |
Hi, Thanks. |
Hi, I made some changes and bullets should be centered now. |
There is however still issue when line height is bigger than font size. |
Most of the line heights will be now fine, but if there will be some big difference between them like font size: 20px; line-height: 80px; bullet will be outlined a little. Is there any pattern between those two? Because text doesn't look like to me its in the middle of the line in the pdf. |
Thanks Daniel. I think i can see what you mean.... Well, at least it looks better now, so... Meh, i can take a look at it locally once merged. Feel free to add yourself to the header/copyright, and also it'll be great if you squash all your commits into a single one, then we can proceed to merge. |
commit 2866f2c Author: Daniel <[email protected]> Date: Sun May 11 17:53:29 2014 +0100 Refactor list bullets commit d052406 Author: Daniel Husar <[email protected]> Date: Fri May 9 16:56:32 2014 +0100 Fix line height issues commit 20fd751 Author: Daniel Husar <[email protected]> Date: Fri May 9 15:25:16 2014 +0100 Auto center bullets in lists. commit 16750b7 Author: Daniel Husar <[email protected]> Date: Thu May 8 09:35:41 2014 +0100 Bottom list spacing commit 3b4bfa5 Author: Daniel Husar <[email protected]> Date: Thu May 8 09:16:51 2014 +0100 refactor spacing commit 1d47f08 Author: Daniel Husar <[email protected]> Date: Wed May 7 17:30:50 2014 +0100 singlequotes commit e22ae61 Author: Daniel Husar <[email protected]> Date: Wed May 7 17:19:34 2014 +0100 add support for bullets commit 81db7cd Author: Daniel Husar <[email protected]> Date: Wed May 7 16:36:54 2014 +0100 add support for lists in html parser
Hi, yep no worries. |
Nice, why these changes to |
Ah, i suspect there were mixed Unix and Windows CRLFs. So, meh. Merging... |
Add support for lists in from html plugin, fixes #140
Hi, thanks a lot. |
Really nice to seee this has been merged into the core. Good work! :) Just wondering what it would take to make it possible to allow stuff like , , , etc. render nicely if you for some reason need to highlight something in a list like
the above will return "Manchester City" in bold but no list-number. How would one do that and still ensure that the list is still showing the bullets? |
Hi, Thanks for adding support for lists!!! I hate to be greedy but are embedded lists supported? Ex.
|
Weirdly enough, this version of the plugin (the one referenced and linked in the Fiddle) supports bulleted lists, but in the current version, the bullet is bottom-aligned to the current LI tag it belongs to when the text exceeds two lines - why would an older version support a feature the newer version no longer does? I've tested my content in the Fiddle above, and even downloaded the version in the fiddle and tested against the content, and it aligns correctly, but going back to the current version (1.2.61), the bullets are bottom-aligned to the list-item block of text (again, when the text exceeds two lines). |
Hi Guys,
I tried to add support for OL and UL lists in from_html plugin.
I have few issues there, the biggest one is that I don't know how to add bullet point so there is dash for now.
Another one si with spacing from bottom on lists which is probably not done very clever way :)
Feel free to ignore or change anything here as its not perfect, but I saw few people demanding support for lists so it might help someone.