@@ -14,10 +14,9 @@ import {
1414 type OnSubmitEditing ,
1515 type OnChangeMentionEvent ,
1616 type OnMentionDetected ,
17- EnrichedText ,
1817} from 'react-native-enriched-html' ;
1918import { WEB_DEFAULT_HTML_STYLE } from './defaultHtmlStyle' ;
20- import type { NativeSyntheticEvent , TextStyle } from 'react-native' ;
19+ import type { NativeSyntheticEvent } from 'react-native' ;
2120import { EditorActions } from './components/EditorActions' ;
2221import { SetValueModal } from './components/SetValueModal' ;
2322import { ImageModal } from './components/ImageModal' ;
@@ -28,6 +27,7 @@ import { Toolbar } from './components/Toolbar';
2827import { MentionPopup , type MentionItem } from './components/MentionPopup' ;
2928import { useUserMention } from './hooks/useUserMention' ;
3029import { useChannelMention } from './hooks/useChannelMention' ;
30+ import { TextRenderer } from './components/TextRenderer' ;
3131
3232const DEFAULT_LINK_STATE : OnLinkDetected = {
3333 text : '' ,
@@ -332,16 +332,7 @@ function App() {
332332
333333 { showHtmlOutput && < HtmlOutputPanel html = { currentHtml } /> }
334334
335- < div className = "container enriched-text-container" >
336- < h1 className = "app-title" > Enriched Text</ h1 >
337- < EnrichedText
338- style = { enrichedTextStyle }
339- htmlStyle = { WEB_DEFAULT_HTML_STYLE }
340- useHtmlNormalizer
341- >
342- { enrichedTextValue }
343- </ EnrichedText >
344- </ div >
335+ < TextRenderer htmlValue = { enrichedTextValue } />
345336
346337 { isSetValueModalOpen && (
347338 < SetValueModal
@@ -383,14 +374,4 @@ const enrichedInputStyle: EnrichedInputStyle = {
383374 fontSize : 18 ,
384375} ;
385376
386- const enrichedTextStyle : TextStyle = {
387- backgroundColor : 'gainsboro' ,
388- width : '100%' ,
389- marginVertical : 12 ,
390- paddingVertical : 12 ,
391- paddingHorizontal : 14 ,
392- borderRadius : 8 ,
393- fontSize : 18 ,
394- } ;
395-
396377export default App ;
0 commit comments