Skip to content

feat: add --rich flag to convert clipboard Markdown to rich text (HTML) - #8

Merged
prateekjain24 merged 1 commit into
mainfrom
claude/markdown-html-converter-jxbwvi
Jul 22, 2026
Merged

prateekjain24 merged 1 commit into
mainfrom
claude/markdown-html-converter-jxbwvi

Conversation

@prateekjain24

Copy link
Copy Markdown
Owner

Copied Markdown pastes as raw syntax into rich editors because the
clipboard only carries a plain-text flavor. The new --rich/-r mode
renders clipboard Markdown to a clean semantic HTML fragment and writes
it back to the macOS pasteboard with both HTML and plain-text flavors,
so pasting into Confluence, Google Docs, Gmail, or Slack produces
formatted content while plain-text targets still get the original
markdown.

  • New richtext module: markdown-it-py (CommonMark + GFM tables and
    strikethrough) plus a BeautifulSoup scrub that unwraps spans, strips
    style/class attributes, and maps code fence languages to Confluence's
    recognized set (js -> javascript, yml -> yaml, ...)
  • New clipboard.copy_rich_text_to_clipboard: AppleScript record with
    hex-encoded «class HTML» data (inverse of the existing HTML read
    path), script passed over stdin to avoid argv size limits
  • CLI: --rich branches before audio auto-detection; composes with
    --preview, secret scanning, and an optional filename to also save
    the HTML

Co-Authored-By: Claude Fable 5 noreply@anthropic.com
Claude-Session: https://claude.ai/code/session_01XHkRru9CypU7LFbyT9vdVX

Copied Markdown pastes as raw syntax into rich editors because the
clipboard only carries a plain-text flavor. The new --rich/-r mode
renders clipboard Markdown to a clean semantic HTML fragment and writes
it back to the macOS pasteboard with both HTML and plain-text flavors,
so pasting into Confluence, Google Docs, Gmail, or Slack produces
formatted content while plain-text targets still get the original
markdown.

- New richtext module: markdown-it-py (CommonMark + GFM tables and
  strikethrough) plus a BeautifulSoup scrub that unwraps spans, strips
  style/class attributes, and maps code fence languages to Confluence's
  recognized set (js -> javascript, yml -> yaml, ...)
- New clipboard.copy_rich_text_to_clipboard: AppleScript record with
  hex-encoded «class HTML» data (inverse of the existing HTML read
  path), script passed over stdin to avoid argv size limits
- CLI: --rich branches before audio auto-detection; composes with
  --preview, secret scanning, and an optional filename to also save
  the HTML

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XHkRru9CypU7LFbyT9vdVX
@prateekjain24
prateekjain24 merged commit 45824ea into main Jul 22, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants