meliorence / react-native-render-html

iOS/Android pure javascript react-native component that renders your HTML into 100% native views
https://meliorence.github.io/react-native-render-html/
BSD 2-Clause "Simplified" License
3.48k stars 589 forks source link

Twitter embed is now working. #530

Closed fatihkayan20 closed 3 years ago

fatihkayan20 commented 3 years ago

Decision Table

Good Faith Declaration

Description

<RenderHTML ignoredStyles={["height"]} renderers={renderers} WebView={WebView} customHTMLElementModels={customHTMLElementModels} defaultWebViewProps={{}} renderersProps={{ iframe: { scalesPageToFit: true, webViewProps: { allow: "encrypted-media *", allowtransparency: true, scalesPageToFit: true, useWebKit: true, }, }, a: { onPress: (_, href) => { handleLinkPress(href); }, }, }} source={{ html: post.content ? post.content : "<p></p>", }} {...{ tagsStyles: { ...tagsStyles, ...{ p: { marginBottom: isPreview ? 0 : -5, }, }, }, contentWidth: width - 30, }} />

I have like this code, I can show youtube and spotify embeds but twitter embed now working. It return url text

React Native Information

System:
    OS: Windows 10 10.0.22000
    CPU: (12) x64 Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz
    Memory: 8.78 GB / 15.86 GB
  Binaries:
    Node: 14.15.4 - C:\Program Files\nodejs\node.EXE
    Yarn: 1.22.15 - ~\AppData\Roaming\npm\yarn.CMD
    npm: 7.13.0 - C:\Program Files\nodejs\npm.CMD
    Watchman: Not Found
  SDKs:
    Android SDK: Not Found
    Windows SDK: Not Found
  IDEs:
    Android Studio: Version  4.2.0.0 AI-202.7660.26.42.7322048
    Visual Studio: 16.9.31112.23 (Visual Studio Community 2019)
  Languages:
    Java: 16.0.1 - /c/Program Files/Common Files/Oracle/Java/javapath/javac      
    Python: 3.9.4 - /c/Program Files/Python39/python
  npmPackages:
    @react-native-community/cli: Not Found
    react: 16.13.1 => 16.13.1
    react-native: https://github.com/expo/react-native/archive/sdk-41.0.0.tar.gz => 0.63.2

RNRH Version

^6.0.5

Tested Platforms

Reproduction Platforms

Minimal, Reproducible Example

<RenderHTML ignoredStyles={["height"]} renderers={renderers} WebView={WebView} customHTMLElementModels={customHTMLElementModels} defaultWebViewProps={{}} renderersProps={{ iframe: { scalesPageToFit: true, webViewProps: { allow: "encrypted-media *", allowtransparency: true, scalesPageToFit: true, useWebKit: true, }, }, a: { onPress: (_, href) => { handleLinkPress(href); }, }, }} source={{ html: post.content ? post.content : "<p></p>", }} {...{ tagsStyles: { ...tagsStyles, ...{ p: { marginBottom: isPreview ? 0 : -5, }, }, }, contentWidth: width - 30, }} />

Additional Notes

No response

jsamr commented 3 years ago

Dear @fatihkayan20, thank you for your submission! Unfortunately, the code you shared is not reproducible (I have no idea what HTML you are rendering in post.content). Please follow our guidelines:

I am closing now, but if you provide enough information so that we can investigate the issue on our end, I will reopen.