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

File metadata

File hashes

Hashes for jupyterlab_paste_content_as_markdown_extension-1.0.3.tar.gz
Algorithm Hash digest
SHA256 fd8c7a1a2146d03fb08c2323af40e2e7fd9a2eb5024ef7745de3f37fd7744c2a
MD5 4ac335aa90930cecfc1dffed4e6f8552
BLAKE2b-256 632746d074fde2063a32ccc9da4344c7bfd26a72835ffe803cc11bb395c037a1

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for jupyterlab_paste_content_as_markdown_extension-1.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 98fb321ee837cb5893350b10e28c2e6d5d9d44291a32217b9a0238db1f8bfbb6
MD5 12534858ce93506f2417bb4cf3072931
BLAKE2b-256 6d83da6d6d912181c7fc858781ffb8555db863f71eaefef14e12242f9b62777d

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