Hướng dẫn react-native-render-html renderers
Use Nội dung chính I want to use a custom component to render some tags, how to do that?#You can define custom renderers for that purpose. See Custom Rendering. How to access the raw HTML from a custom renderer?#Use How to render iframes?#That's really a piece of cake. See @native-html/iframe-plugin. How to set the default font size and family?#You should use How to render inline images?#See this example from the docs: Example: Displaying Inline Images. Aren't there better renderers for tables?#Sure! The default renderer is very limitted. Check-out @native-html/table-plugin and @native-html/heuristic-table-plugin. How can I make textual content selectable?#You can take advantage of Selectable text example
Press on the button below to show how this code renders on your device. However, the end-user won't be able to select across multiple blocks: this is a limitation of React Native. Troubleshooting#Warning: You seem to update the X prop of the Y component in short periods of time...#There is a detailed explaination for this warning here: Stack Overflow | react-native-render-html, "You seem to update ...". Custom font families don't work, what's happening?#You must register fonts available in your app with Also note that Line breaks ( |