Notebook Assets Renderer
Preview notebook-relative DataFrame HTML files directly in VS Code notebooks
without embedding the full HTML document in the .ipynb file.
Features
- Renders
application/vnd.notebook-assets.dataframe+json outputs inline.
- Keeps large pandas HTML previews outside the notebook for smaller diffs and
coding-agent-friendly files.
- Preserves pandas and
Styler CSS while matching VS Code's native notebook
table appearance.
- Supports notebook-relative paths on local, remote, and virtual file systems
through the VS Code workspace file-system API.
- Removes scripts, iframes, forms, event handlers, and external resource URLs
before inserting HTML into the notebook output.
Requirements
- VS Code 1.100 or later.
- A notebook output producer that emits the MIME descriptor below. In Jupyter,
this is typically Python with IPython and pandas.
- A trusted workspace. The extension reads HTML files referenced by notebook
outputs and is disabled in Restricted Mode.
The custom MIME type is:
application/vnd.notebook-assets.dataframe+json
Its JSON value can contain:
{
"version": 1,
"kind": "dataframe",
"shape": [1000, 20],
"html": "assets/example.ipynb/result.html",
"mtime_ns": 1750000000000000000,
"data": {
"parquet": "assets/example.ipynb/result.parquet"
}
}
Only html is required by the renderer. The path must be relative to the
notebook's directory. Absolute paths, URI schemes, .., query strings, and
fragments are rejected.
Python example
Write the rich HTML next to the notebook and emit only its relative path:
from pathlib import Path
from IPython.display import display
MIME = "application/vnd.notebook-assets.dataframe+json"
html_path = Path("assets/example.ipynb/result.html")
html_path.parent.mkdir(parents=True, exist_ok=True)
html_path.write_text(df._repr_html_(), encoding="utf-8")
display(
{
MIME: {
"version": 1,
"kind": "dataframe",
"shape": list(df.shape),
"html": html_path.as_posix(),
},
"text/plain": repr(df),
},
raw=True,
)
Keep a text/plain fallback so the output remains readable when the extension
is unavailable.
Security and privacy
HTML assets are read only after Workspace Trust is granted. Active content and
external resource references are removed before rendering. The extension does
not execute notebook code, send telemetry, or transmit files over the network.
Known limitations
- The extension currently renders external HTML previews only.
- JavaScript and interactive HTML widgets are intentionally not supported.
- The referenced asset must remain available relative to the notebook.
Support
Use the Q & A section on this extension's Marketplace page for usage
questions and bug reports. Include your VS Code version, operating system,
workspace type, trust status, sanitized MIME descriptor, and the exact renderer
error. Do not include private notebook contents or credentials.
License
Copyright © 2026 GrayF. All rights reserved. The full license is included in
the extension package.