Style is not working in img tags
DeepakSharma04 opened this issue · 0 comments
DeepakSharma04 commented
Decision Table
- My issue does not look like “The HTML attribute 'xxx' is ignored” (unless we claim support for it)
- My issue does not look like “The HTML element
<yyy>
is not rendered”
Good Faith Declaration
- I have read the HELP document here: https://git.io/JBi6R
- I have read the CONTRIBUTING document here: https://git.io/JJ0Pg
- I have confirmed that this bug has not been reported yet
Description
I am receiving the html body response from api and it's not show in accepted format .
React Native Information
"react": "17.0.2",
"react-dom": "^18.0.0",
"react-native": "0.68.2",
"react-native-render-html": "^6.3.4",
RNRH Version
"react-native-render-html": "^6.3.4",
Tested Platforms
- Android
- iOS
- Web
- MacOS
- Windows
Reproduction Platforms
- Android
- iOS
- Web
- MacOS
- Windows
Minimal, Reproducible Example
import React from 'react';
import { useWindowDimensions } from 'react-native';
import RenderHtml from 'react-native-render-html';
import { SafeAreaView } from 'react-native-safe-area-context';
const source = {
html: `
<div><div><br><br><div><div><div data-toggle=\"collapse\" data-target=\".ticket_break_hidden_area\" style=\"cursor: pointer;\">...</div><div class=\"collapse ticket_break_hidden_area\"><div><div><div><div>On Fri, 7 Jul 2023, 12:02 hack er, <<a href=\"mailto:adamsecurer@gmail.com\">adamsecurer@gmail.com</a>> wrote:<br></div><blockquote style=\"margin:0 0 0 0.8ex;border-left:1px #ccc solid;padding-left:1ex;\"><div><div><br><br><div><div>On Fri, 7 Jul 2023, 12:00 hack er, <<a href=\"mailto:adamsecurer@gmail.com\" target=\"_blank\" rel=\"noreferrer noopener\">adamsecurer@gmail.com</a>> wrote:<br></div><blockquote style=\"margin:0 0 0 0.8ex;border-left:1px #ccc solid;padding-left:1ex;\"><div><div><blockquote style=\"margin:0 0 0 0.8ex;border-left:1px #ccc solid;padding-left:1ex;\"><div><div><br><div>new ping pong<div style=\"width:396px;height:18px;background-color:rgb(245,245,245);padding:5px;color:rgb(34,34,34);font-family:arial;font-style:normal;font-weight:bold;font-size:13px;border:1px solid rgb(221,221,221);line-height:1;\"><a href=\"https://drive.google.com/file/d/1inH9GP6cUof3qH8yC72rGN3umXDeQzCO/view?usp=drive_web\" style=\"text-decoration:none;padding:1px 0;border:none;\" target=\"_blank\" rel=\"noreferrer noopener\"><img style=\"border:none;\" src=\"https://ssl.gstatic.com/docs/doclist/images/icon_10_generic_list.png\" alt=\"icon_10_generic_list.png\"> <span style=\"color:rgb(17,85,204);text-decoration:none;\">faveo-helpdesk-advance-development.zip</span></a></div></div></div></div></blockquote></div></div></blockquote></div></div></div></blockquote></div></div></div></div>
`
};
export default function App() {
const { width } = useWindowDimensions();
return (
<SafeAreaView>
<RenderHtml
contentWidth={width}
source={source}
/>
</SafeAreaView>
);
}
Additional Notes
img and span is achor tag under div not look same.
Accepted output -
But showing like