Skip to content

[FEATURE]: Copy assistant messages as rich text for pasting into Google Docs, Notion, etc. #10693

Closed as not planned

Description

@rscarvalho

Feature hasn't been suggested before.

  • I have verified this feature I'm about to request hasn't been suggested before.

Describe the enhancement you want to request

Problem

OpenCode renders markdown beautifully in the terminal - headers, code blocks, lists, and formatting all look great. But when I copy Claude's responses to paste into Google Docs, Notion, or other rich text editors, all that formatting is lost. I get plain text and have to manually reformat everything.

Proposed Solution

Add a setting copy_as_rich_text (default: false) that converts markdown to HTML when copying assistant messages. When enabled:

  • Bold, italic, inline code, and links preserve their formatting
  • Headers, bullet lists, and numbered lists maintain structure
  • Code blocks become monospace <pre> blocks
  • Tables stay as tables

The feature would gracefully fall back to plain text with a helpful warning toast if the system doesn't support rich text clipboard (e.g., missing wl-clipboard on Linux, or copying over SSH).

Use Cases

  1. Documentation: Copy Claude's explanations directly into team docs without reformatting
  2. Note-taking: Paste code snippets and instructions into Notion/Obsidian with formatting intact
  3. Sharing: Quickly share formatted responses in emails or collaborative documents

Usage

Option 1: Toggle at runtime

Press Ctrl+P to open the command palette and select "Toggle copy as rich text". A toast confirms the current mode. This setting persists for the session.

Option 2: Set in config (permanent default)

{
  "tui": {
    "copy_as_rich_text": true,
  },
}

Platform Considerations

  • macOS: AppleScript pasteboard (built-in)
  • Linux Wayland: wl-copy --type text/html (requires wl-clipboard)
  • Linux X11: xclip -t text/html (requires xclip)
  • Windows: PowerShell clipboard API (built-in)
  • SSH/tmux: Falls back to plain text with notification

Activity

  1. added
    discussionUsed for feature requests, proposals, ideas, etc. Open discussion
    on Jan 26, 2026
  2. github-actions commented on Jan 26, 2026

    @github-actions
    Contributor

    This issue might be a duplicate of existing issues. Please check:

    Feel free to ignore if none of these address your specific case.

  3. andrewdunndev commented on Mar 24, 2026

    @andrewdunndev

    This overlaps with #14041 (copy as markdown). I commented there with an implementation approach that covers both: a DropdownMenu on the existing copy button with Copy Text, Copy Markdown, and Copy for Email (sanitized HTML with inline styles for Gmail/Outlook/Notion). Happy to PR it.

  4. assigned and unassigned on Apr 26, 2026
  5. removed
    discussionUsed for feature requests, proposals, ideas, etc. Open discussion
    on May 3, 2026
  6. github-actions commented on Jul 6, 2026

    @github-actions
    Contributor

    To stay organized issues are automatically closed after 60 days of no activity. If the issue is still relevant please open a new one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions