Skip to content

Commit 3326913

Browse files
committed
fix rendering trusted static html
- fixing qmd had broken non-rmd mode
1 parent 2ea575c commit 3326913

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

src/packages/frontend/frame-editors/html-editor/iframe-html.tsx

+1-5
Original file line numberDiff line numberDiff line change
@@ -112,10 +112,6 @@ export const IFrameHTML: React.FC<Props> = React.memo((props: Props) => {
112112
};
113113

114114
useEffect(() => {
115-
if (mode != "rmd") {
116-
setInit(false);
117-
return;
118-
}
119115
let actual_path = path;
120116
if (mode == "rmd" && derived_file_types != undefined) {
121117
if (derived_file_types.contains("html")) {
@@ -270,7 +266,7 @@ export const IFrameHTML: React.FC<Props> = React.memo((props: Props) => {
270266
return (
271267
<iframe
272268
ref={iframe}
273-
srcDoc={mode != "rmd" ? value : (srcDoc ?? "")}
269+
srcDoc={!trust && mode != "rmd" ? value : (srcDoc ?? "")}
274270
width={"100%"}
275271
height={"100%"}
276272
style={{ border: 0, ...style }}

0 commit comments

Comments
 (0)