Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ const PrettyRenderSelection: React.FC<React.PropsWithChildren<PrettyRenderSelect
<option value={'video'}>{'Video'}</option>
</optgroup>
<optgroup label={'Other'}>
<option disabled>{'Web'}</option>
<option value={'web'}>{'Web'}</option>
<option value={'hex'}>{'Hex'}</option>
</optgroup>
</Select>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,14 @@ function renderFormat(language: string | null, contentType: string | null, body:
);
}

case 'web': {
const blob = URL.createObjectURL(new Blob([body], { type: contentType ?? 'text/html' }));

return (
<iframe src={blob} />
);
}

case null:
default: {
const text = new TextDecoder().decode(body);
Expand Down