Preview HTML files

An HTML file opens in the side panel beside your chat as its own preview tab. By default it is shown as a safe, static view: the page appears, but its scripts do not run. With the Interactive HTML preview advanced feature on, the page's scripts run. The preview pane itself and its viewer picker are on Preview files in the side panel.

The static view

Run the page's scripts

  1. Open Settings > Developer > Advanced features.
  2. Turn on Interactive HTML preview. The first turn-on asks you to accept the feature's risks.
  3. The change applies immediately: an open preview reloads with the page's scripts running.

Advanced features covers the list and its switches; the feature's row describes the risk in full.

Warning

An interactive page can show fake prompts or try to reach services on your computer or network. Keep the interactive view off for pages you do not trust.

What the interactive view reads

With the interactive view on, the preview reads the files the page names directly, rebuilds the page with them and runs it in a closed frame. The page cannot reach DataMind Oda or your files beyond what the preview reads for it.

Limits:

When a page cannot be shown

Questions, answered

Why do the scripts in my HTML file not run?

HTML opens in the static view by default, and that view does not run scripts. Turn on Interactive HTML preview in Settings > Developer > Advanced features to run them; the change applies immediately.

How do I turn on the interactive preview?

Open Settings > Developer > Advanced features and turn on Interactive HTML preview. The first turn-on asks you to accept its risks, and the change applies right away: an open preview reloads with its scripts running. Advanced features covers the list.

Is it safe to open an HTML file Oda wrote?

In the static view the page cannot run scripts, load anything from the network, or lead you off the pane through a link or a form, so it is shown as a picture of the page. With the interactive view on, the page runs in a closed frame cut off from DataMind Oda and from your files beyond the ones the preview reads for it; even so, a page can show fake prompts or try to reach services on your computer or network, so keep the interactive view off for pages you do not trust.

What files does an HTML preview read?

The preview reads the page itself in both views. In the static view it also reads the page's images, and only those. With the interactive view on it also reads the classic scripts and stylesheets the page names directly, plus its images. Files are read relative to the page's own location with your account's access; a file the page fetches while it runs, a CSS import or a module script is never read.

Why is an image in my page missing?

The preview reads and shows only local images the page names directly, or ones its styles point to. Check that the image sits beside the page, has a supported type (PNG, JPEG, GIF, WebP, AVIF, SVG, BMP or ICO) and is within the size limits; an image the page's own code adds while it runs, or one loaded from a web address, is not read by the preview.

Why do the links in my page do nothing?

In the static view the preview makes links inert, so a click cannot take you or the app anywhere; forms and redirects are blocked the same way. Open the file in your browser or its usual application if you need to use it as a page.

What are the limits for an HTML preview?

With the interactive view on, the page and its scripts and stylesheets are read up to 32 MiB together, 4 MiB per script or stylesheet, at most 64 files; images are capped at 4 MiB each, 16 MiB together and 256 images, in both views. Over a script or stylesheet limit the page does not open; an image over its limit stays broken.

Can I zoom an HTML page?

No; HTML previews have no zoom control. The floating control you see on images and PDFs is not offered here; Preview files in the side panel covers zoom.

Does the preview reload when one of the page's files changes?

Yes. When the page itself changes it is reread, and the preview follows the files it reads: its images in both views and, with the interactive view on, its scripts and stylesheets. A change to one of them reloads the page; Preview files in the side panel covers the changed notice and Reload.

What does This HTML document could not be previewed. mean?

The page could not be prepared. The common causes: the file is not valid text; or, with the interactive view on, a script or stylesheet could not be read or a limit was exceeded. Check the file and the files it names, turn Interactive HTML preview off to show the static page where a script or stylesheet is the cause, and use Open with to read the file's source if you want to inspect it.