You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Bug]: Pasting rich text with hyperlinks into composer drops URLs instead of converting to Markdown links #42058
I searched existing issues and did not find a duplicate.
I included enough detail to reproduce or investigate the problem.
Area
apps/web
Steps to reproduce
Copy rich text containing a hyperlink from a web page, document, or chat app (where clipboard text/html contains <a href="https://github.com/KKKKhazix/agent-autoloop">Agent-Autoloop 仓库</a> and text/plain only has 实现参考另附 Agent-Autoloop 仓库).
Paste it into the T3 Code chat composer (normal paste, not Paste as Plain Text and not inside a code block).
Expected behavior
Hyperlinks from text/html should be preserved as Markdown links in the composer (matching Codex and standard Markdown editors), e.g.:
(While keeping literal plain-text paste behavior inside code blocks and when using "Paste as Text".)
Actual behavior
The hyperlink URL is silently stripped and only plain text is pasted:
实现参考另附 Agent-Autoloop 仓库
Impact
Minor bug or occasional failure
Version or commit
main @ 86349553c5
Root cause notes
ComposerPromptEditorTiptap.tsx (handlePaste) reads only text/plain via readPastedPlainText(clipboardData) in apps/web/src/components/composerInlineTokenPaste.ts.
text/html on paste is currently only inspected for T3 internal context chips (decodeComposerContextClipboardHtml) and image detection (clipboardHtmlImageContent), and Tiptap's link extension is disabled (link: false).
apps/web/src/components/chat/composerFocusRedirect.ts (pasteTextToFocusComposer) and apps/web/src/components/chat/ChatComposer.tsx (onComposerPaste / foldPastedText) also read only text/plain.
Note: apps/web/src/markdown-clipboard.ts already handles DOM-to-Markdown serialization on copy, but there is no equivalent HTML link conversion on paste.
Workaround
Manually copy the link URL separately and paste it into the composer.
Activity
fix(web): pasted rich-text hyperlinks keep their URL as Markdown links