Skip to main content

jupyterlab_paste_content_as_markdown_extension

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

Paste clipboard content as markdown into JupyterLab. Copy formatted text from a web page, email, or Word document, right-click in a text editor or notebook cell, and select "Paste as Markdown" - the HTML formatting is converted to clean markdown on the fly.

Full disclosure: This extension adds one context menu item. It reads your clipboard, converts whatever formatting it finds to markdown, and pastes it. That's it. No AI, no blockchain, no cloud sync. Just clipboard-to-markdown, the way nature intended.

Paste as Markdown

Features

  • Paste as Markdown context menu - Right-click in a text editor or a notebook cell's input area to find "Paste as Markdown" directly below the regular paste
  • HTML to markdown conversion - Converts formatted HTML copied from web pages, emails, and documents into clean markdown using ATX headings, fenced code blocks, and standard list markers
  • Rich text support - Handles content copied from Word, Google Docs, Confluence, Notion, and other rich text editors that place HTML on the clipboard. These carry bold, italic and strikethrough as CSS on a plain <span> rather than as tags, and Word writes its bulleted and numbered lists as ordinary paragraphs with the bullet as literal text; both are rebuilt into markdown, lists keeping their nesting and the number they started at
  • Preserves structure - Maintains headings, lists, links, bold, italic, strikethrough, task lists, code blocks and tables during conversion, including tables copied from a spreadsheet, which carry no header row of their own. Markdown has no merged cell, so a colspan or rowspan keeps one column and its row is padded out. Every value survives, but cells beside or below a merged one can sit a column left of where the spreadsheet drew them
  • Discards what markdown cannot carry - Stylesheets, scripts and document metadata are dropped rather than pasted as text, so a paste from Word does not arrive with its CSS attached
  • Replaces the selection - Behaves like the built-in paste: selected text is replaced, not written alongside
  • Plain text fallback - When the clipboard offers no HTML, or the HTML converts to nothing, the plain text content is pasted as-is

How It Works

Most applications place both plain text and HTML on the clipboard when you copy formatted content. This extension reads the HTML flavour via the browser Clipboard API, runs it through Turndown with the GFM plugins, and replaces the current selection with the result. If no HTML is found, it falls back to plain text.

Images are kept when their source still resolves elsewhere - an http(s):, data: or protocol-relative URL. Word and Outlook reference images as file:/// paths in a local temp folder, which resolve on no other machine, so those are dropped rather than pasted as links that cannot load.

A link wrapping block content - a heading, a list, a table, or simply a div - loses its address: markdown has nowhere to put one, and the content it wraps is worth more than the stray brackets that keeping it would produce.

Coverage is file editors and notebook cells. The console prompt, the terminal and the Settings raw editor are not covered.

Requirements

  • JupyterLab >= 4.6.0

Install

pip install jupyterlab_paste_content_as_markdown_extension

Usage

  1. Copy formatted content from any source (web page, Word, Google Docs, email)
  2. Right-click in a JupyterLab text editor, or in a notebook cell's input area
  3. Select Paste as Markdown from the context menu

The converted markdown replaces the current selection, or is inserted at the cursor when nothing is selected.

Uninstall

pip uninstall jupyterlab_paste_content_as_markdown_extension

Contributing

If you would like to contribute to this extension, please refer to the Contributing Guide.

License

BSD 3-Clause License

Metadata

Release files for jupyterlab-paste-content-as-markdown-extension 1.0.20

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for jupyterlab-paste-content-as-markdown-extension 1.0.20
File Size Uploaded Provenance Actions
jupyterlab_paste_content_as_markdown_extension-1.0.20.tar.gz 476.5 kB Without provenance Details for jupyterlab_paste_content_as_markdown_extension-1.0.20.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for jupyterlab-paste-content-as-markdown-extension 1.0.20
File Interpreter ABI Platform Actions
jupyterlab_paste_content_as_markdown_extension-1.0.20-py3-none-any.whl Python 3 none any Details for jupyterlab_paste_content_as_markdown_extension-1.0.20-py3-none-any.whl

Total release size: 526.1 kB

Release files / jupyterlab_paste_content_as_markdown_extension-1.0.20.tar.gz

Download URL jupyterlab_paste_content_as_markdown_extension-1.0.20.tar.gz
Size 476.5 kB
Tags Source
SHA-256 checksum
How to use checksums
e3c10ffdd1cd7d35360e035fd3238781220c10243738efd440c433b306ac32dd
BLAKE2b-256 checksum
How to use checksums
a7c76d0582bace7548e48dc1d8df869837ffc0da2aa1f505383d3e719bd70ef2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.10

Release files / jupyterlab_paste_content_as_markdown_extension-1.0.20-py3-none-any.whl

Download URL jupyterlab_paste_content_as_markdown_extension-1.0.20-py3-none-any.whl
Size 49.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
13dd89f78eefab10ead4e793fb57e7346bbd0b7cc0494f3180e1657eacb044de
BLAKE2b-256 checksum
How to use checksums
ce0e31fd4a980e9d394fd4af7942714a52f18b6a3ef58ad0b31d7c4de2a59527
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.10

Security for jupyterlab-paste-content-as-markdown-extension 1.0.20

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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