You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'd expect the Text component corresponding to the second block with the mention style to have the background color I gave it, and looking pretty much like that:
Do you think that would be possible ? I know the backgroundColor style prop works fine with Text components in react-native, but if you didn't handle it maybe there's a reason, I'm just curious to know if you could manage to support it or not.
Yes it's working fine for me, I was even able to add custom styles to some elements. Unfortunately some CSS properties are just not supported and won't work, such as backgroundColor.
You can define your own block styles, but if you're trying to use a CSS property that's not supported inside, it will be ignored. Take a look at the code, if I remember correctly, style props are assigned explicitly, which leads to some CSS being unavailable
Activity
bibek-magar commentedon Feb 5, 2021
Is css working on your native view?
bockc commentedon Feb 5, 2021
@beevekmgr I'm not sure I fully understand your question, could you develop a little bit ?
bibek-magar commentedon Feb 5, 2021
is draft js render working??
In my case css is not working but html view only working...
bockc commentedon Feb 8, 2021
Yes it's working fine for me, I was even able to add custom styles to some elements. Unfortunately some CSS properties are just not supported and won't work, such as backgroundColor.
You can define your own block styles, but if you're trying to use a CSS property that's not supported inside, it will be ignored. Take a look at the code, if I remember correctly, style props are assigned explicitly, which leads to some CSS being unavailable