using <b> tag will break the line
See original GitHub issueUsing <b>
tag inside a string will break the line.
<HTMLView
value={ "A word will be <b>bold</b> inside this string." }
/>
- Expected:
A word will be
bold
inside this string."
- What I got acctually with react-native-htmlview:
A word will be
bold
inside this string."
By the way, is there any convenient tag to add attributes to specific words in a string?
Issue Analytics
- State:
- Created 6 years ago
- Reactions:4
- Comments:12 (1 by maintainers)
Top Results From Across the Web
<br>: The Line Break element - HTML - MDN Web Docs - Mozilla
The <br> HTML element produces a line break in text (carriage-return). It is useful for writing a poem or an address, where the...
Read more >HTML Line Break – How to Break a Line with the HTML <br ...
Basic HTML Line Break Syntax. You can insert line breaks in HTML with the <br> tag, which is equivalent to a carriage return...
Read more >The Dos and Don'ts of Adding an HTML Line Break
To do a line break in HTML, use the <br> tag. Simply place the tag wherever you want to force a line break....
Read more >What is the correct way of using , , or in HTML? - Tutorialspoint
There are multiple correct ways to use a br tag in the web documents. In HTML, a line break is made with the...
Read more >HTML <br> Tag - GeeksforGeeks
In this article, we will know how to add line-break using HTML <br> tag. The browser does not recognize new line and paragraph...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Had the same problem, fixed it like this:
<HTMLView style={{flex:1, flexDirection: 'row', alignItems: 'flex-start', flexWrap: 'wrap'}} value={myhtmlcontent} />
Yes, that behaviour’s probably not ideal right now. It’s not just
<b>
: even a<span>
will reproduce this. Note that it’s not an issue if you can wrap the content in a block-level tag:I imagine there’s a reasonable way to correct this, but for now it’ll probably require a wrapper.