Skip to main content

jupyterlab_advanced_markdown_viewer_extension

GitHub Actions npm version PyPI version Total PyPI downloads JupyterLab 4 Brought To You By KOLOMOLO Donate PayPal

Keep open Markdown files live. When an AI agentic tool or any other process rewrites a Markdown file on disk, the open rendered view picks up the change on its own: the tab title signals it, removed text is struck on a pale red background, added text stands on a pale green background, and both fade. No more reloading the tab to see the latest content. You can also mark passages and attach notes to them, kept in the Markdown file itself.

Full disclosure: the rest of your JupyterLab stays exactly as it was. This extension only makes sure that the Markdown file you are looking at is the one that is actually on disk.

Features

  • Live updates - open Markdown documents refresh automatically when the file changes on disk
  • Tab title cue - the document tab signals that new content arrived
  • Change highlighting - removed text is struck through on a pale red background, added text stands on a pale green background, both fading out calmly. The strike is deliberate: a reader who cannot tell red from green still sees which text is going by its line, not only by its colour
  • Changes play out as typing - added text appears letter by letter on its green background, in every changed place at once; removed text first turns red, then is deleted from its last letter backwards. The reader follows a change as it happens and no text disappears without warning. The animation setting turns this off; animationSpeed sets the speed in characters per second
  • Rendered view - live updates apply to the rendered Markdown view; an editor open on the same file keeps JupyterLab's own File Changed dialog for a save over unsaved edits
  • Unsaved edits are never overwritten - a change arriving while the document has unsaved edits is held, shown as a red square on the tab, and applied once the document is clean again
  • A file that is gone says so - a document whose file has been deleted carries a still cross on the tab, distinct from the held change by shape and by movement, and takes the new content if the file comes back
  • Marks and notes in the file itself - select a passage in the rendered view, right-click and mark it in one of six colours, with notes attached to it; or select with caret browsing (F7) and press Accel Shift M, also in the command palette as Mark the selected passage. A mark is a pair of HTML comments around the passage, so the Markdown file carries everything and any other renderer shows the document with no trace of it
  • Notes on the document as a whole - press the plus control in the notes panel's header; the note is stored in a marker at the top of the file, after any front matter, with no passage, and listed first in the panel. While the panel is hidden a small notes badge sits at the top right of the preview, faint without notes and in the chrome's own grey with them, and opens the panel
  • A panel beside the preview - the marks of the open document listed in order, each with its passage and its notes; a narrow strip of ticks instead, or nothing at all. The state you leave it in is written into the file, so the document opens the way you left it
  • Marking while the agent writes - a mark is written through the extension's own server route, which compares the file with what the preview holds and writes under a lock, so marking while writes stream in raises no File Changed dialog and the preview keeps following. A writer appending faster than about one line per 50 ms can still lose a line that lands inside the server's own write, a few milliseconds wide. A lab without the server extension, a document holding your unsaved edits, or live updates turned off keeps JupyterLab's save and its File Changed dialog; there, choose Revert, which keeps the agent's text

A change part way through: added text typed in on green, the last line still mid-word, and the removed text struck on red before it is deleted

The three tab markers side by side: a half-filled circle part way through its turn on report.md, whose change is waiting to be read; a red square on draft.md, whose change is held back because the editor beside it holds unsaved edits; and a red cross on archive.md, whose file is gone from disk

Usage

The screenshots below show the JupyterLab Dark theme; the colours follow the active theme.

  • Open a Markdown file with the Markdown Preview. It follows the file from then on; a change arriving from disk is highlighted and the tab shows a marker until you look
  • Select a passage in the preview, right-click and pick a colour under Mark; or select with caret browsing (F7) and press Accel Shift M. Choose Add note to mark and write a note in one step
  • Press the plus in the notes panel header for a note on the document as a whole; the panel is shown from the badge at the top right of the preview or from Show notes in the context menu. The context menu and the palette offer no entry for the document note itself
  • Click a row in the panel to reveal its passage and open its notes, colours and removal control; the caret at the header's left edge collapses the panel to a strip of ticks, the cross hides it. With the panel hidden, the notes badge at the top right of the preview brings it back

The notes panel beside the preview: three marked passages in yellow, blue and pink, a note on the document as a whole listed first, the yellow row open with its note, Add note, colour dots and removal control, and the pink row with its note

The panel collapsed to the minimap: a narrow strip of ticks at the marks' positions, with the hide control at the top, the plus and the expand caret under it

The panel hidden: the small notes badge at the top right of the preview, in the chrome's own grey because the document holds notes

The context menu over a selection with the Mark submenu open, each of the six colours drawn with the swatch the panel shows

Settings

All settings live under Settings, Advanced Settings Editor, Advanced Markdown Viewer.

  • enabled - on by default; off, the preview keeps what it showed until the document is reloaded; marks and notes have their own setting
  • pollInterval - the interval of the fallback check for filesystems that raise no file events, in seconds; file events through the server extension are the primary path, so a lower value does not make updates faster
  • highlight - green and red backgrounds on changed text
  • fadeDuration - how long the highlight stays on changed text, in milliseconds; it rises over 0.5 s and fades away over the last 0.75 s
  • animation - on by default; changes play out as typing
  • animationSpeed - typing and deletion speed in characters per second; 0 shows a change at once
  • tabCue - the markers on the document tab
  • notes - on by default; off, the panel, the marks and the marking entries are hidden and the markers in the file are left alone
  • author - the handle a note line opens with; empty, the extension uses the name the lab reports for the reader

Requirements

  • JupyterLab >= 4.0.0

Install

To install the extension, execute:

pip install jupyterlab_advanced_markdown_viewer_extension

Uninstall

To remove the extension, execute:

pip uninstall jupyterlab_advanced_markdown_viewer_extension

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

File details

Details for the file jupyterlab_advanced_markdown_viewer_extension-1.0.5.tar.gz.

File metadata

File hashes

Hashes for jupyterlab_advanced_markdown_viewer_extension-1.0.5.tar.gz
Algorithm Hash digest
SHA256 abab736dc05e1c8d16df7f7efe58c405e53b107d0a56316eeab1e4c41cee31f7
MD5 d8908516cf670bdc5a7584e3c66532e6
BLAKE2b-256 4b05433642a9d5f04850610f51fd35236062d15c78c65f34b515046026b749da

See more details on using hashes here.

File details

Details for the file jupyterlab_advanced_markdown_viewer_extension-1.0.5-py3-none-any.whl.

File metadata

File hashes

Hashes for jupyterlab_advanced_markdown_viewer_extension-1.0.5-py3-none-any.whl
Algorithm Hash digest
SHA256 88fadba16a1d6c27e9743ca602e9cc46f445385124e1fa6990e42ed54e4b8ebc
MD5 fa54927c213b60744c47431bd32db4d4
BLAKE2b-256 65ea8c4c3472f7a787fe916dd6e255b487ad87883adc49aa707a0aeba65e92ef

See more details on using hashes here.

Release history Release notifications | RSS feed

1.0.12

2 files

1.0.11

2 files

1.0.10

2 files

1.0.9

2 files

1.0.8

2 files

1.0.7

2 files

This release

1.0.5 This release

2 files

1.0.4

2 files

1.0.3

2 files

0.6.41

2 files

0.6.28

2 files

0.6.10

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page