[Feature Request] Copy selection as rich text (for Outlook and Slack)
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 48/100
- issue の種類
- 機能追加
- 明瞭さ
- おおむね明確
- 活発さ
- 活発
- 技術スタック
- typescript
調査の方向性
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.
索引モデルが issue の本文から書いたものです。
説明
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
- 主要言語
- TypeScript
- スター
- 8.7k
- フォーク
- 649
- 平均マージ
- 11時間 48分
- マージ済み PR(30日)
- 552
環境構築
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
backnotprop/plannotator のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 67/100
backnotprop/plannotator#2317 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
backnotprop/plannotator#2306 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
backnotprop/plannotator#2290 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
backnotprop/plannotator#2243 · コメント 1 件 · リアクション 1 件 ·
メンテナーはふだん 1 日以内に返信
-
Annotate documentation omits per-file version history and privacy controls再び着手できるかも このイシューのプルリクエストはマージされずにクローズされました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
backnotprop/plannotator#1086 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
backnotprop/plannotator の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
marmelab/react-admin#11431 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
db-ux-design-system/core-web#8655 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
stripe/react-stripe-js#728 ·
-
[Upload Grade C dataset] the pop-up changes it's size while uploading the document => Jumping effectオープンbug
難易度 2/5 1〜3時間 初心者へのやさしさ 66/100
epam/statgpt-admin-frontend#305 ·
メンテナーはふだん 1 日以内に返信