[英]I am trying to display email consisting of html in React Js
I am trying to display a page html in React Js But I don't get the same look This is the code I used in React js <div dangerouslySetInnerHTML={{ __html: data }}/>
This is the page when it's executed in html enter image description here This is the page when it's executed in React js enter image description here我正在尝试在 React Js 中显示页面 html 但我没有得到相同的外观 这是我在 React js 中使用的代码
<div dangerouslySetInnerHTML={{ __html: data }}/>
这是执行时的页面html enter image description here这是在React js中执行时的页面enter image description here
I used tag iframe and it worked <iframe srcdoc={data}/>
我使用了标签 iframe 并且它有效
<iframe srcdoc={data}/>
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.