Feature Requests

NumberOfLines
Current implementation of number of lines such that: import React, { memo } from 'react'; import { modifyHtml } from '@_utils/ExternalHyperlink'; import { useWindowDimensions } from 'react-native'; import RenderHTML from 'react-native-render-html'; import HTML from 'react-native-render-html'; const MemoizedRenderHtml = ({ html }) => { const { width } = useWindowDimensions(); const MemoRenderHTML = memo(RenderHTML); const domVisitors = { onElement: modifyHtml, }; const defaultTextProps = { numberOfLines: 2, } if (!html) { return }; return ( <MemoRenderHTML contentWidth={width} baseFontStyle={{ fontFamily: 'Nunito', fontSize: 12, color: '#555' }} tagsStyles={{ p: { fontFamily: 'body', fontSize: 14, color: '#555' }, ul: { fontFamily: 'body', fontSize: 14, color: '#555' }, li: { fontFamily: 'body', fontSize: 14, color: '#555' }, h1: { fontFamily: 'heading', fontSize: 18, color: '#555' }, h2: { fontFamily: 'heading', fontSize: 16, color: '#555' }, h3: { fontFamily: 'heading', fontSize: 14, color: '#555' }, h4: { fontFamily: 'heading', fontSize: 12, color: '#555' }, h5: { fontFamily: 'heading', fontSize: 10, color: '#555' }, h6: { fontFamily: 'heading', fontSize: 8, color: '#555' }, }} source={{ html }} domVisitors={domVisitors} defaultTextProps={defaultTextProps} /> ); }; export default MemoizedRenderHtml; where the html is: <p> <span data-sheets-value='{"1":2,"2":"Experience the thrill of adventure with our latest outdoor gear collection. Whether you’re hiking, camping, or exploring, our products are designed to enhance your journey and ensure your safety."}' data-sheets-userformat='{"2":5053,"3":{"1":0},"5":{"1":[{"1":2,"2":0,"5":{"1":2,"2":0}},{"1":0,"2":0,"3":3},{"1":1,"2":0,"4":1}]}}'>Experience the thrill of adventure with our latest outdoor gear collection. Whether you’re hiking, camping, or exploring, our products are designed to enhance your journey and ensure your safety.<br /><br /></span> </p> <p><em>Our Adventure Ready Standard Kit includes top-of-the-line gear for all your outdoor needs, featuring durable backpacks, high-performance tents, and versatile survival tools!<br /><br /></em></p> <p><strong>Dimensions:</strong> Kit contents vary; typically fits in a standard backpack.</p> the number of lines applies to all of the paragraph and doesn't limit the rest of the html to render " Experience the thrill of adventure with our latest outdoor gear collection. Whether you’re hiking, camping, or exploring, our products are designed to enhance your journey and .... " is the expected output but " Experience the thrill of adventure with our latest outdoor gear collection. Whether you’re hiking, camping, or exploring, our products are designed to enhance your journey and ... Our Adventure Ready Standard Kit includes top-of-the-line gear for all your outdoor needs, featuring durable backpacks, high-performance tents, and versatile survival ... Dimensions: Kit contents vary; typically fits in a standard backpack. " is the output/rendered html
0
Load More