react-native-htmlview
react-native-htmlview copied to clipboard
Can not change Text direction
I want to have a <p> node with justified and rtl direction, but I can't achieve that
react-native: 0.60.4 Node: 10.15.3 - C:\Program Files\nodejs\node.EXE Yarn: 1.17.3 - C:\Program Files (x86)\Yarn\bin\yarn.CMD npm: 6.4.1 - C:\Program Files\nodejs\npm.CMD Android Studio: Version 3.2.0.0 AI-181.5540.7.32.5056338
What I tried:
setting direction: 'rtl' to the <p> node and <body> nodesetting textAlign: 'right' to <body> node (when I set <body> it also remove all the content break line and ignore child style too!)setting textComponentProps={{ style: {textAlign: 'right',} }}
Here is sample content:
<body><div>hello</div><p>Lorem ipsum is placeholder text commonly used in the graphic, print, and publishing industries for previewing layouts and visual mockups.</p></body>
And this is stylesheet:
StyleSheet.create({
body: {
direction: 'rtl',
textAlign: 'right'
},
div: {
textAlign: 'center',
marginBottom: 20
},
p: {
textAlign: 'justify'
},
});
I have the same problem in IOS. Can anyone solved this?
p: { textAlign:'left', },