[Feature Request] Copy selection as rich text (for Outlook and Slack)
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 48/100
- Tipo di issue
- Funzionalità
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Attiva
- Stack tecnologico
- typescript
- Ambito
- developer-experience, frontend
Direzione di ricerca
Start by reading packages/ui/utils/clipboard.ts and packages/ui/utils/selectionActions.ts, then trace how AnnotationToolbar.tsx exposes selection actions and how the #1174 fallback handles copying. Define the rich-text output and cleanup rules from the issue, including plain-text fallback and HTTP behavior. Done means the toolbar action and shortcut copy formatted HTML plus plain text, with cleaned markup; the Slack-specific action is conditional on HTML pasting poorly into Slack.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Problem
I review plans and documents in Plannotator, then share parts of them by email (Outlook) and in chat (Slack). Every copy action in the UI copies plain text only. The selection toolbar's copy button, Vim Y and "Copy as markdown" on tables all go through copyTextToClipboard() in packages/ui/utils/clipboard.ts, which calls navigator.clipboard.writeText(). When I paste, I lose headings, bold, links, lists and code formatting.
Today I paste the text into an external converter first:
Their output is what I want from a "Copy for Outlook" or "Copy for Slack" action, without leaving Plannotator.
Proposal
Add a built-in Copy as rich text action to the selection toolbar, with a keyboard shortcut. It writes one ClipboardItem with two formats:
text/html: the rendered selection. Outlook, Word, Google Docs and other apps that accept rich text keep the formatting.text/plain: the current plain text, as the fallback.
If the HTML copy does not paste well into Slack, add a second action, Copy for Slack. It writes Slack markup as plain text (*bold*, _italic_, <url|text>, • bullets, code blocks), like Slackdown does.
Alternative considered
Expose the existing selectionActions prop (packages/ui/utils/selectionActions.ts, used in AnnotationToolbar.tsx) through config, so that users can add their own copy actions. #1572 made that seam opt-in for host apps only ("Plannotator as the provider of these capabilities, not a product that uses them"), so a built-in action seems a better fit. If configurable actions are acceptable, the seam already provides the button, the dropdown and the selection context.
Notes
- Clean up the copied HTML. Remove annotation highlights,
data-block-idattributes, toolbar elements and theme colors, so that dark-theme colors do not appear in an email. ClipboardItemneeds a secure context. The fallback added in #1174 could also callclipboardData.setData('text/html', ...)in its copy handler, so that the action still works over plain HTTP on remote hosts.
Version: plannotator 0.28.22 (Pi extension). I checked the code paths above against main
- Lingua principale
- TypeScript
- Stelle
- 8.7k
- Fork
- 649
- Merge medio
- 4h 9m
- PR unite (30g)
- 448
Preparare l'ambiente
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di backnotprop/plannotator
-
Annotate documentation omits per-file version history and privacy controlsForse di nuovo libera Una pull request per questa issue è stata chiusa senza essere unita. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
backnotprop/plannotator#1086 · 2 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
Plan history loses its Versions tab when the agent changes directory into another git repo between submitsForse già presa @backnotprop l’ha presa oggi. Apertabug
Difficoltà 4/5 3-5 giorni Idoneità per principianti 48/100
backnotprop/plannotator#2197 ·
I maintainer di solito rispondono entro 1 giorno
-
show full file nameApertaaccepted enhancement
Difficoltà 2/5 1-3 ore Idoneità per principianti 58/100
backnotprop/plannotator#2195 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
enhancement
Difficoltà 4/5 3-5 giorni Idoneità per principianti 45/100
backnotprop/plannotator#2194 ·
I maintainer di solito rispondono entro 1 giorno
-
[Bug] plannotator-* preference cookies pollute every app running on localhostForse già presa @utpalsinghdev l’ha presa oggi. Apertabug
Difficoltà 4/5 3-5 giorni Idoneità per principianti 25/100
backnotprop/plannotator#2184 · 2 commenti ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di backnotprop/plannotator
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
Merit-Systems/x402scan#1312 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 1 giorno
-
Native Web
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 80/100
digitalfabrik/integreat-app#4517 ·
I maintainer di solito rispondono entro 2 giorni
-
TLS guide repeats certs/ in the certificate directoryForse già presa @maheshrijal l’ha presa oggi. Aperta
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 92/100
prometheus/docs#3156 ·
I maintainer di solito rispondono entro 2 giorni
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 83/100
medusajs/dtc-starter#90 ·
I maintainer di solito rispondono entro 1 giorno