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
Computes lines with one very long word #2
Comments
When the css rule [ 'Craspharetraph',
'aretragravida.Vi',
'vamusconsequ',
'atlacusvelposu',
'erecongue.Duis',
'aloremvitaeexa',
'uctorscelerisqu',
'enoneuturpis.Ut',
'imperdietmagn',
'asitametjustobi',
'bendumvehicul',
'a.' ] This rule can also be enforced by adding style overwrites to the method call like this: textMetrics(el).lines(text, {}, {'word-break': 'break-all'}); |
I have tried a similar situation with overflow-wrap: break-word; but without any luck. My "VeryVeryVeryVeryVeryLongText" doesn't break. Any ideas? |
Sorry for the late reply. I totally missed this issue. |
seems a bit more complicated than i thought ;) |
I think it could be cool to split a word by length when it's too long. The idea will be to split a long word each part should have given maximum number of characters.
For example if we use
lines
method on a string like thisCraspharetrapharetragravida.Vivamusconsequatlacusvelposuerecongue.Duisaloremvitaeexauctorscelerisquenoneuturpis.Utimperdietmagnasitametjustobibendumvehicula.
.Actually it returns the same string, with the option
wordwrap
it should return something like the example just below.The text was updated successfully, but these errors were encountered: