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
word-wrap:break-word is not working #664
Comments
Are you really using word-wrap:break-work? That is really bad when it turns parrot into par rot or worship into wors hip for example. I have yet to find a usable use for it but it is tempting when there is no such thing as max-font or force down to size in css. |
I know but this function is very necessary for my service. The view of the user is It is very ambigous for users. |
We're having this problem. We're using an html/text editor which uses break-word when a word is longer than the available width and has to be broken automatically. The rendering we see after using html2canvas with letterRendering enabled does not match. Often times, the line of text is rendered one line further down than it should without any wrapping at all. |
we are also facing the same issue. |
@savokiss can you create pull request that does auto-replacing if the option is specified? |
I have same question |
Any news about this issue? I used, for testing, the latest version of html2canvas.js file and I still have the same problem :( |
I wanted to really test this issue and indeed it seems to be reproduced even with the test-console on the official page. I created a very simple webpage, located at http://mariusbike83.wix.com/test1. This page contains only some fields and a text-area with a very long string (without spaces to break it up). When this is rendered with html2canvas library, you'll notice that the string is one-lined. Has anyone found a solution to this problem? (Btw, the official test console is located at https://html2canvas.hertzen.com/screenshots.html and be sure to uncheck the "Disable javascript" checkbox) |
For my application, I downgraded from 0.5.0-alpha1 to v0.4.1 and it seemed to work, so I am just going to use that version. I haven't thoroughly tested, but for sure long strings of characters wrapped properly. Try this to see if it resolves the issue; although other bugs might be introduced in the process due to big differences in the versions. |
how about manually break each character with span tag by jquery? |
letterRendering set to true worked for me.... |
Is there no way to resolve this problem without using |
Hi @SatoshiKawabata, did you try using the option |
@eKoopmans I tried that but it didn't work too. |
@eKoopmans @SatoshiKawabata I can confirm that on beta te letterRendering does not work too. Seems on older 0.4.1 version it works but on beta no. |
@gelinger777 I want to use this by |
I had solved it. change
to
|
@love-everyday you should make a PR |
@CodyMoore240 It was already resolved in 1.0.0-alpha.1 |
Thank you i will fork. |
I fixed it by add
|
This issue started 5 years ago... and counting:
Now the paragraph looks good and the screenshot html2canvas takes is OK. Another thing: the paragraph element must have the following css rules:
Take care y'all |
'this.options.letterRendering' and 'noLetterSpacing(container)' work together,you can add CSS letter-spacing to solve it. if you use CSS word-break,you can also change
to
|
word-wrap:break-word is not working when the text is too long without any white spaces.
like <div style="width:30px;height:100px;word-wrap:break-word;">aaaaaaaaaaaaaaa</div>
The text was updated successfully, but these errors were encountered: