[FEATURE] Support for CSS attribute word-break
Nice package you created! Is the support of the word-break attribute planned or is there a workaround? I want to display a table, but it produces an overflow on the right side because I can not allow him to break lines in words.
Do you have a small example html that we can use to reproduce this issue? By default content in tables should break up in lines, but not in syllables.
By default content in tables should break up in lines, but not in syllables.
Yes and that is exactly my problem. I have very long words and now enough space, so I want to allow him to break lines even in the middle of words if necessary.
<table>
<tr>
<td>Thisssssssissssssaveryyyyyyylongworddddddddd</td>
<td>Thisssssssissssssaveryyyyyyylongworddddddddd</td>
</tr>
</table>
Flutter is a bit notorious for not handling this well and not really supporting the text breakup you might expect or at least hope for. See also https://github.com/flutter/flutter/issues/18761 for a discussion.
Perhaps you are well off by allowing the table to scroll horizontally?
customRender: {
"table": (context, child) {
return SingleChildScrollView(
scrollDirection: Axis.horizontal,
child:
(context.tree as TableLayoutElement).toWidget(context),
);
},
},
Ah okay I see. Well I guess scrolling is better then an overflow, but I would prefer if the user can see the whole table without scrolling. Because there is more then enough space vertically. But I guess if flutter can not handle this then you can not implement it in your libary. I guess there is also no chance to implemented the html tag <wbr> and ­ char because of this? Anyway thanks for the info.
Just testet the ­ and noticed that it works theoretically. It allows to break the word and this also works in your flutter_html. But the "-" Symbol- to indicate that connection between the two parts of the word is missing. @erickok