Skip to content

Commit

Permalink
show rendered html with iframe
Browse files Browse the repository at this point in the history
  • Loading branch information
solaoi committed May 9, 2022
1 parent 650d9ff commit 200e09a
Showing 1 changed file with 6 additions and 11 deletions.
17 changes: 6 additions & 11 deletions ui/src/rete/controls/EndpointControl.jsx
Expand Up @@ -7,17 +7,12 @@ export class EndpointControl extends Rete.Control {
Preview
</label>
{contentType === "text/html; charset=utf-8" ? (
<div
className="hasScrollbar"
style={{
backgroundColor: "white",
overflowY: "auto",
maxHeight: "500px",
}}
// eslint-disable-next-line react/no-danger
dangerouslySetInnerHTML={{
__html: value,
}}
<iframe
style={{ backgroundColor: "white" }}
title="preview"
srcDoc={value}
width={600}
height={400}
/>
) : (
<textarea
Expand Down

0 comments on commit 200e09a

Please sign in to comment.