Support pasting more HTML elements
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 25/100
- Issue type
- Feature
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- html, javascript, markdown
- Domain
- frontend
Research direction
Review the html-to-markdown spike and the linked Google Doc test cases first. Compare existing paste-markdown behavior with the listed HTML elements and define coverage for headings, code, emphasis, lists, and quotes; done means those clipboard inputs produce the intended Markdown without regressing existing special cases.
Written by the indexing model from the issue text.
Description
This was originally an issue by @imjohnbo in github/special-projects, a private repository:
Summary
Today, content is pasted into GitHub comments (issues, PRs, discussions, etc) as plaintext, except for a few special cases managed by
@github/paste-markdown.It's a laborious process to add formatting and links of the copy source back into the paste target. For example:
- Copying/pasting part of a GitHub comment into a GitHub comment box – maybe in a different issue – in order to reply to it
- Copying/pasting part of a Google Doc shared with a customer into a GitHub comment box in order to add context to it
- ...
This issue would build on https://github.com/github/special-projects/issues/679 and investigate adding Slack-like paste functionality for the features GitHub developers care about, including:
name html markdown headings <h1>,<h2>...#,##, etc.inline code <code>` code`code block <pre><code>``` code```bold <strong>**bold** italics <em>*italics* ordered lists <ol><li>1. item unordered lists <ul><li>- item task lists ? - [x] completed item quotes blockquote> a long quote Example
This Google Doc:
![]()
is pasted as:
Big Heading Lorem ipsum dolor sit amet, consectetur adipiscing elit. Mauris eleifend consectetur nisl, vel vestibulum odio mattis sit amet. Integer vehicula rhoncus augue, eu congue magna porttitor eget. Medium Heading Lorem ipsum dolor sit amet, consectetur adipiscing elit. Mauris eleifend consectetur nisl, vel vestibulum odio mattis sit amet. Integer vehicula rhoncus augue, eu congue magna porttitor eget. Small Heading Lorem ipsum dolor sit amet, consectetur adipiscing elit. Mauris eleifend consectetur nisl, vel vestibulum odio mattis sit amet. Integer vehicula rhoncus augue, eu congue magna porttitor eget.when I would like it to be:
# Big Heading Lorem ipsum dolor sit amet, consectetur adipiscing elit. Mauris eleifend consectetur nisl, vel vestibulum odio mattis sit amet. Integer vehicula rhoncus augue, eu congue magna porttitor eget. ## Medium Heading Lorem ipsum dolor sit amet, consectetur adipiscing elit. Mauris eleifend consectetur nisl, vel vestibulum odio mattis sit amet. Integer vehicula rhoncus augue, eu congue magna porttitor eget. ### Small Heading Lorem ipsum dolor sit amet, consectetur adipiscing elit. Mauris eleifend consectetur nisl, vel vestibulum odio mattis sit amet. Integer vehicula rhoncus augue, eu congue magna porttitor eget.Spike
I started a spike over the weekend which allows for this:
Other
- Pasteboard Viewer helps understand what's in the macOS clipboard
- Here is a Google Doc with some test cases for convenience ❇️
- Dominant language
- JavaScript
- Stars
- 234
- Forks
- 47
- Avg merge
- 1d 12h
- Merged PRs (30d)
- 5
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from github/paste-markdown
-
Pasting a link whose text/html label is a shortened form of its URL plants a `[` inside the URL Open
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
github/paste-markdown#118 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
github/paste-markdown#107 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 45/100
github/paste-markdown#104 ·
-
Difficulty 3/5 1-2 days Newbie friendliness 35/100
github/paste-markdown#100 ·
-
Difficulty 3/5 1-2 days Newbie friendliness 48/100
github/paste-markdown#96 · 1 comment ·
All issues in github/paste-markdown
Similar issues
-
ai-observability bug team/ai-observability
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
AllTheMods/ATM-10-L#19 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
SignalK/n2k-signalk#345 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
-
Difficulty 1/5 1-3 hours Newbie friendliness 88/100
JuliaPluto/PlutoPlotly.jl#72 ·
