Visually preview or download HTML and CSS code in ChatGPT's new 'GPT-4o with canvas' model and UI.
HTML Viewer for ChatGPT Extension
Use this extension to quickly and easily preview your HTML and CSS code directly within OpenAI's new \"ChatGPT-4o with canvas\" model/UI.
This tool adds an eyeball icon to the canvas interface for HTML/CSS code canvases, allowing you to instantly visualize the code displayed in the canvas without the need to save or test locally.
With a single click, the extension renders your code in a pop-up iFrame, saving you time and effort while making the editing process smoother and more efficient. No more tedious back-and-forth between saving files and checking your work—just quick, in-browser previews.
You can also quickly download to an HTML file with the download button.
**Important: Please read the caveats and limitations below**
Instructions:
1. Generate new HTML/CSS code, or view already generated canvas code, in \"ChatGPT-4o with canvas\" at chatgpt.com or chat.openai.com.
2. When the canvas opens automatically, or you open it manually on existing canvas code, the preview eyeball icon button should appear at the top-right of the canvas within a second or two.
3. Press the preview button to visually view your HTML/CSS code.
4. Press the X or the Esc key to close the preview pop-up.
Caveats and limitations:
- You must be in the \"ChatGPT-4o with canvas\" model/UI.
- HTML/CSS code canvases must start with '' or the preview button won't appear, as there's no point to visually preview any other programming languages.
- Some CSS styling may not look quite right or exactly perfect in preview, possibly due to iFrame limitations or differences. If something looks a little off, it's recommended to always download the HTML and open in your browser before asking ChatGPT for changes on minor appearances based only on what you see in preview.
- References to external CSS and scripts, as well as inline scripts, will not work **in the preview iFrame** due to content security policies. You can however use the download button to quickly save to an HTML file and then open it in your browser, and this limitation would not apply.
- You need to Ctrl + click a link, or link button, in your HTML preview to navigate to it in a new tab. Normal clicking links in your HTML doesn't work, as it is blocked by CSP.
Donate: https://www.paypal.com/donate/?hosted_button_id=DQ5LYLT8NA26W
download icons PNG Designed By 588ku from https://pngtree.com/freepng/file-download-icon_4647924.html?sol=downref&id=bef
Read more
This tool adds an eyeball icon to the canvas interface for HTML/CSS code canvases, allowing you to instantly visualize the code displayed in the canvas without the need to save or test locally.
With a single click, the extension renders your code in a pop-up iFrame, saving you time and effort while making the editing process smoother and more efficient. No more tedious back-and-forth between saving files and checking your work—just quick, in-browser previews.
You can also quickly download to an HTML file with the download button.
**Important: Please read the caveats and limitations below**
Instructions:
1. Generate new HTML/CSS code, or view already generated canvas code, in \"ChatGPT-4o with canvas\" at chatgpt.com or chat.openai.com.
2. When the canvas opens automatically, or you open it manually on existing canvas code, the preview eyeball icon button should appear at the top-right of the canvas within a second or two.
3. Press the preview button to visually view your HTML/CSS code.
4. Press the X or the Esc key to close the preview pop-up.
Caveats and limitations:
- You must be in the \"ChatGPT-4o with canvas\" model/UI.
- HTML/CSS code canvases must start with '' or the preview button won't appear, as there's no point to visually preview any other programming languages.
- Some CSS styling may not look quite right or exactly perfect in preview, possibly due to iFrame limitations or differences. If something looks a little off, it's recommended to always download the HTML and open in your browser before asking ChatGPT for changes on minor appearances based only on what you see in preview.
- References to external CSS and scripts, as well as inline scripts, will not work **in the preview iFrame** due to content security policies. You can however use the download button to quickly save to an HTML file and then open it in your browser, and this limitation would not apply.
- You need to Ctrl + click a link, or link button, in your HTML preview to navigate to it in a new tab. Normal clicking links in your HTML doesn't work, as it is blocked by CSP.
Donate: https://www.paypal.com/donate/?hosted_button_id=DQ5LYLT8NA26W
download icons PNG Designed By 588ku from https://pngtree.com/freepng/file-download-icon_4647924.html?sol=downref&id=bef
Source Manifest.json
{"update_url": "https://clients2.google.com/service/update2/crx", "name": "HTML Viewer for ChatGPT", "version": "1.1.0.0", "manifest_version": 3, "description": "Visually preview or download HTML and CSS code in ChatGPT's new 'GPT-4o with canvas' model and UI.", "icons": { "16": "icons/logo_16x16.png", "32": "icons/logo_32x32.png", "64": "icons/logo_64x64.png", "128": "icons/logo_128x128.png", "256": "icons/logo_256x256.png" }, "action": { "default_popup": "popup/popup.html" }, "web_accessible_resources": [{ "resources": ["icons/logo_32x32.png", "icons/download_32x32.png"], "matches": ["*://chat.openai.com/*", "*://chatgpt.com/*"] } ], "permissions": ["clipboardRead"], "content_scripts": [{ "matches": ["*://chat.openai.com/*", "*://chatgpt.com/*"], "js": ["purify.min.js", "content.js"], "run_at": "document_idle", "all_frames": true } ]}
Read more