Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Style is not working in img tags #638

Open
9 of 15 tasks
DeepakSharma04 opened this issue Jul 7, 2023 · 0 comments
Open
9 of 15 tasks

Style is not working in img tags #638

DeepakSharma04 opened this issue Jul 7, 2023 · 0 comments
Labels
bug Crush'em all.

Comments

@DeepakSharma04
Copy link

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

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:[email protected]\">[email protected]</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:[email protected]\" target=\"_blank\" rel=\"noreferrer noopener\">[email protected]</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 -

Screenshot 2023-07-07 at 4 29 10 PM

But showing like

Screenshot 2023-07-07 at 4 24 30 PM
@DeepakSharma04 DeepakSharma04 added the bug Crush'em all. label Jul 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Crush'em all.
Projects
None yet
Development

No branches or pull requests

1 participant