Implemented Show/Hide Preview button in HighlightCode component. Frame height set to 400px as max-height for SyntaxHighlighter.
Button appears, only if Content-Type header is text/html, it's reasonable to be able preview HTML.
For safety reason, iframe using sandbox.
Motivation and Context
Lack of сonvenient feature in compare to API clients like Postman and Insomnia
Add feature to preview HTML in response
Description
Implemented
Show/Hide Preview
button inHighlightCode
component. Frame height set to400px
asmax-height
forSyntaxHighlighter
. Button appears, only ifContent-Type
header istext/html
, it's reasonable to be able preview HTML. For safety reason,iframe
using sandbox.Motivation and Context
Screenshots:
My PR contains...
src/
is unmodified: changes to documentation, CI, metadata, etc.)package.json
)My changes...
Documentation
Automated tests