Rich text paste into markdown #12866

Open
opened 2025-11-02 10:23:21 -06:00 by GiteaMirror · 0 comments
Owner

Originally created by @silverwind on GitHub (Apr 17, 2024).

Feature Description

When pasting text from the web pages into the markdown textarea, we can make it preserve certain features like links and maybe inline code blocks into the markdown output. For example copying a paragraph from MDN on Github pastes this:

A fetch() promise only rejects when the request fails, for example, because of a badly-formed request URL or a network error. A fetch() promise does not reject if the server responds with HTTP status codes that indicate errors (404, 504, etc.). Instead, a then() handler must check the Response.ok and/or Response.status properties.

GitHub's implementation has one annoyance: When copying a single link, the intention is more often than not to paste as plain text, so I would paste single links that are only surrounded by whitespace as plain.

Originally created by @silverwind on GitHub (Apr 17, 2024). ### Feature Description When pasting text from the web pages into the markdown textarea, we can make it preserve certain features like links and maybe inline code blocks into the markdown output. For example copying [a paragraph from MDN](https://developer.mozilla.org/en-US/docs/Web/API/fetch) on Github pastes this: > A fetch() promise only rejects when the request fails, for example, because of a badly-formed request URL or a network error. A fetch() promise does not reject if the server responds with HTTP status codes that indicate errors (404, 504, etc.). Instead, a then() handler must check the [Response.ok](https://developer.mozilla.org/en-US/docs/Web/API/Response/ok) and/or [Response.status](https://developer.mozilla.org/en-US/docs/Web/API/Response/status) properties. GitHub's implementation has one annoyance: When copying a single link, the intention is more often than not to paste as plain text, so I would paste single links that are only surrounded by whitespace as plain.
GiteaMirror added the type/proposaltype/feature labels 2025-11-02 10:23:21 -06:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#12866