Skip to main content

JupyterLab extension to paste clipboard content (HTML, formatted text) as markdown into text editors and notebook cells

Project description

jupyterlab_paste_content_as_markdown_extension

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

[!TIP] This extension is part of the stellars_jupyterlab_extensions metapackage. Install all Stellars extensions at once: pip install stellars_jupyterlab_extensions

Paste clipboard content as markdown into JupyterLab. Copy formatted text from a web page, email, or Word document, right-click in any 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 any text editor or notebook cell to find "Paste as Markdown" right next to the regular paste
  • HTML to markdown conversion - Converts formatted HTML content 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
  • Preserves structure - Maintains headings, lists, links, bold, italic, code blocks, tables, and images during conversion
  • Plain text fallback - When no HTML is available on the clipboard, pastes the plain text content as-is
  • Works everywhere in JupyterLab - File editors, markdown cells, code cells, and any editable area

How It Works

Most applications place both plain text and HTML on the clipboard when you copy formatted content. This extension reads the HTML version via the browser Clipboard API, runs it through Turndown to produce markdown, and inserts the result at your cursor position. If no HTML is found, it falls back to plain text.

Requirements

  • JupyterLab >= 4.0.0

[!NOTE] The browser Clipboard API requires a secure context (HTTPS or localhost). If JupyterLab is served over plain HTTP on a remote host, the clipboard read will fail and you will see an error dialog. Use HTTPS or an SSH tunnel in that case.

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 notebook cell
  3. Select Paste as Markdown from the context menu

The converted markdown appears at your cursor position.

Uninstall

pip uninstall jupyterlab_paste_content_as_markdown_extension

License

BSD 3-Clause License

Project details


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_paste_content_as_markdown_extension-1.0.4.tar.gz.

File metadata

File hashes

Hashes for jupyterlab_paste_content_as_markdown_extension-1.0.4.tar.gz
Algorithm Hash digest
SHA256 2820c93a31e0245748dae49ff0c9cbaad170b7238b28df57c63f1d0ed592ad5a
MD5 ace46bc898d0ee986359141a5a23516b
BLAKE2b-256 ddbab677b5d032f3fa6fc942c7c7bda061015b5e11a0e51b10813fe2f0006219

See more details on using hashes here.

File details

Details for the file jupyterlab_paste_content_as_markdown_extension-1.0.4-py3-none-any.whl.

File metadata

File hashes

Hashes for jupyterlab_paste_content_as_markdown_extension-1.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 1ac5fbb97cb401bdfa5afc1dc6d5257c55cf89c83c3360f81578207e988d2b68
MD5 0b9ee32af2b73dab12f3824dca5fcba8
BLAKE2b-256 848088fcb1446e0c4a1ae88651a9cab2c4c0392f4014526b696c4486e7c47cd8

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page