react-native-htmltotext
2.0.1 • Public • Published react-native-htmltotext
Render html string using Text and View components by using parse5 to parse the html
Nesting of block element inside inline element is not supported
Supported elements are u, b, i and div
Example
input:
text<span>unsupportedtag</span><b>bold<div>unsupported nested elements</div></b><div>div1srart<b>bold</b><i>italic</i><div>div1innerstart<b>bold</b>div1innerend</div>div1end</div><div>div2</div><u>underline</u>
<HtmlText
html={'the html as a string'}
inlineNodeStyle={{fontSize: 18, color: 'black'}}
blockNodeStyle={{flexDirection: 'column', justifyContent: 'center'}}
/>
output:
Readme
Keywords
nonePackage Sidebar
Install
npm i react-native-htmltotext
Weekly Downloads