extensions icon indicating copy to clipboard operation
extensions copied to clipboard

[API] Raycast 2.0 beta: Clipboard.copy({ html, text }) writes plain text only, html flavor never reaches pasteboard

Open dportalesr opened this issue 3 months ago • 3 comments

Description

On Raycast 2.0 beta, copying HTML content via the API puts only the plain-text representation on the macOS pasteboard. The html key is silently dropped. Affects both Clipboard.copy({ html, text }) and Action.CopyToClipboard with Clipboard.Content. Pasting into rich targets (MS Teams, Outlook, TextEdit) yields plain text instead of a link/rich content.

Steps to reproduce

  1. In any extension: await Clipboard.copy({ html: '<a href="https://example.com">test</a>', text: "test" })
  2. Inspect pasteboard: osascript -l JavaScript -e 'ObjC.import("AppKit"); $.NSPasteboard.generalPasteboard.types.js.map(t => t.js).join("\n")'

Expected

public.html flavor present alongside public.utf8-plain-text (documented behavior, works via direct NSPasteboard write).

Actual

Only plain-text flavors present:

public.utf8-plain-text
NSStringPboardType
org.nspasteboard.source
org.nspasteboard.AutoGeneratedType

Environment

  • Raycast 2.0 beta (Raycast Beta.app, com.raycast-x.macos) v0.71.2.0
  • @raycast/api 1.104.18
  • macOS Darwin 25.5.0

Workaround

Setting the pasteboard via AppleScript record (set the clipboard to {«class HTML»:«data HTML<hex>», string:...}) writes both flavors correctly, so the regression appears to be in the beta's Pasteboard XPC path, not the extension runtime types.

dportalesr avatar Aug 05 '26 21:08 dportalesr

Is this solved?

solarz-stripe avatar Sep 28 '26 12:09 solarz-stripe

Sorry, not quite yet but in the next release!

mathieudutour avatar Sep 28 '26 13:09 mathieudutour

Thanks you @mathieudutour!

solarz-stripe avatar Sep 28 '26 15:09 solarz-stripe