Flutter_html: <strong> tag creates break, when useRichText equals true

Created on 1 May 2019  路  10Comments  路  Source: Sub6Resources/flutter_html

I saw previous issues about incorrect work tag "strong". I write useRichText:true and everything works well, but there is an exception when tag is at the beginning.

bug

Most helpful comment

@Sub6Resources I have the same issue if string starts with <strong> tag:

<strong>15<\/strong>% of the text are stop words.

The result is:

15
% of the text are stop words.

My attributes:

Html(
    data: htmlString,
    useRichText: true,
    defaultTextStyle: new TextStyle(fontSize: 14.0, color: const Color(0xff4c4c4c)),
 )

Could you please help me.

All 10 comments

Can you post your HTML code and a screenshot of what you're seeing?

image
image

Hmm, that's odd. What attributes do you have set on your Html widget?

@Sub6Resources I have the same issue if string starts with <strong> tag:

<strong>15<\/strong>% of the text are stop words.

The result is:

15
% of the text are stop words.

My attributes:

Html(
    data: htmlString,
    useRichText: true,
    defaultTextStyle: new TextStyle(fontSize: 14.0, color: const Color(0xff4c4c4c)),
 )

Could you please help me.

The workaround is enclose it in a paragraph, prefixing with <p>

This has been fixed in version 0.9.7. Thank you!

Thank you!

@Sub6Resources I got unexpected top and bottom padding in version 0.9.7. (left screen - we used lib with version 0.9.6, right screen - we used lib with version 0.9.7)

|

--- | ---

@Sub6Resources I found that these lines produce issue with padding.
image

Yup, that does appear to be the issue. I'll work on fixing this in the next version, which should hopefully be out later this week.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

red42 picture red42  路  4Comments

raLaaaa picture raLaaaa  路  3Comments

Seedorf161 picture Seedorf161  路  5Comments

Zerocchi picture Zerocchi  路  5Comments

robert-virkus picture robert-virkus  路  3Comments