react-native-markdown-renderer
react-native-markdown-renderer copied to clipboard
TextAlign: center does not work in bold/strong element on Android
I have tried everything in custom styling, but nothing works on Android while on iOS single "textAlign: center" works without any problems
strong: {
fontSize: 18,
color: Colors.darkBlueFont,
fontFamily: Fonts.NunitoBlack,
width: '100%',
textAlign: 'center',
margin: 'auto',
display: 'flex',
flex: 1,
flexDirection: 'row',
textAlignVertical: 'center',
alignContent: 'center',
alignSelf: 'center',
alignItems: 'center',
justifyContent: 'center',
},
I am pretty sure this is related to this: https://github.com/iamacup/react-native-markdown-display/issues/42#issuecomment-562199006 which i have not found an elegant fix for on the table alignments, it would apply to any nested <Text>
things though
@iamacup Seems the issue is due to the textgroup on Android not inheriting the common styles from body.
Manually setting textgroup: { textAlign: 'center' }
fixed the issue for me.