URL标记内更智能的粘贴

Suggestion to improve something that keeps causing me trouble.

TLDR version:

It’d be nice if the smart-pasting code that creates title + link URL markup would check if it was pasting inside existing URL markup and, if it is, just paste the text instead of making a mess of the existing markup.

Details:

When typing a post, I often make a URL by manually typing everything except the URL which I copy and paste from the browser address bar.

So I might have this:

[Click Here](http://www.example.com)

I then decide “Click Here” isn’t a good enough link title and go find the page’s real title, from something that links to it.

I select and copy that text, then paste it over “Click Here” in my post.

Discourse sees I have a URL + title in the clipboard (something I have no control over, and usually am not aware of, since I selected text and copied text to the clipboard, and pasting into most places would just give me just that text, but the web browser has also included the URL for things that specifically look for it).

Discourse does something which totally makes sense when pasting outside of markup, but creates a mess when inside markup. I end up with this:

[ [The Page's Real Title](http://www.example.com)](http://www.example.com)

At that point (and with much longer URLs than this simplified example) I’m usually so confused by the nested markup that I delete all the markup and start again.

It’d be nice if the smart-pasting code checked if it was pasting inside existing URL markup and just pasted the text, without the URL or any extra markup, in this situation.

(Of course, in a lot of cases I could paste over all the markup and use what Discourse generates for me. But I still can’t get used to that; in my mind, there’s just text in the clipboard, as that’s what gets pasted everywhere else. And there are times when the URL doesn’t exactly match the one I copied the title from: For example, when linking to a specific post within a thread, or a specific timestamp in a YouTube video.)

2 个赞

As a workaround I use ctrlshiftv to paste as text in Chrome, doesn’t work in Firefox though

2 个赞

您使用的是什么操作系统?要在 Windows 10/11 中粘贴为纯文本,请尝试以下方法:

  • Win+v
  • tabenterenter

或者这个

  • Ctrl+Shift+v

默认情况下,使用 Ctrl+v 进行纯粘贴会产生“格式化粘贴”……

使用 AWS EC2 实例配置文件 来授予对 S3 存储桶的访问权限。注意:启用此功能需要 Discourse 在配置适当的 EC2 实例中运行,并且会覆盖“s3 访问密钥 ID”和“s3 密钥访问密钥”设置。

但是当使用上述按键序列时……

使用 AWS EC2 实例配置文件来授予对 S3 存储桶的访问权限。注意:启用此功能需要 Discourse 在配置适当的 EC2 实例中运行,并且会覆盖“s3 访问密钥 ID”和“s3 密钥访问密钥”设置。

我用的是 Windows,是的。我的主要问题是,我直到粘贴了文本并搞得一团糟之后才想到这件事。:smiley:

1 个赞

在我的公司 Windows 电脑上,我使用 PureText 并将其设置为 Ctrl+Shift+V
它的默认设置是 Win+V,但我将其保留给新的、不错的 Windows 10 自带剪贴板历史记录。
对我来说,唯一缺点是它会阻止我的 Vivaldi 的“粘贴并转到”功能。

1 个赞