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.5.tar.gz.

File metadata

File hashes

Hashes for jupyterlab_paste_content_as_markdown_extension-1.0.5.tar.gz
Algorithm Hash digest
SHA256 1c497978ec76d5c14ffe787c338f8a2ed25954019260d4b8f8fabcafb5375cb0
MD5 23541074c13cf8b39733ae6fa8c8e8c8
BLAKE2b-256 1af4acdd93c2afd638c8afb241544666b5108a1a78f7690b775ce12291caacc8

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for jupyterlab_paste_content_as_markdown_extension-1.0.5-py3-none-any.whl
Algorithm Hash digest
SHA256 40f3c11e9b75b9212b34aaf4f6ac7bc0b024d138bc90d36eb0866f7dc11e2b88
MD5 d6f43365e472150bf68660967e11efc0
BLAKE2b-256 a27bdd5f4ef05180464fe9764a4a420a048128dd92b4376ce52cc2cc82c363ff

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