Zulip Chat Archive

Stream: Zulip meta

Topic: pasting in Zulip


Floris van Doorn (Nov 21 2024 at 00:16):

One thing I'm regularly annoyed by is that I copy-paste some text from a webpage into a Zulip message, some extra "markup" is pasted with it. I don't actually know if this is Zulip doing this or whether it is my browser (Firefox), since I also see it in various other text boxes.

I'm talking about things like:

  • Copy-pasting a issue number like #1 from Github gives # #1
  • Copy-pasting a declaration name like Nat from the Mathlib docs gives [Nat](https://leanprover-community.github.io/mathlib4_docs/Init/Prelude.html#Nat)
  • Copy-pasting an URL like https://leanprover-community.github.io/mathlib4_docs/Init/Prelude.html#Nat while having text foo selected gives [foo](https://leanprover-community.github.io/mathlib4_docs/Init/Prelude.html#Nat)

The first two I regularly have to undo and then I paste it with ctrl+shift+V to paste it without markup. The last doesn't even give me the plain URL even when pasting with ctrl+shift+V.
Can I disable all this "smart" behavior, either in my browser or in Zulip, whichever is responsible?

Julian Berman (Nov 21 2024 at 01:58):

(It's Zulip it would seem -- specifically it's https://github.com/zulip/zulip/blob/65f05794ee59d638ad054ae6602d8ebc980fb637/web/src/copy_and_paste.ts#L400 )

The most sledgehammer-y way to make sure no site should ever screw around with copy/paste is go to about:config and turning dom.event.clipboardevents.enabled to false.

Kim Morrison (Nov 21 2024 at 03:05):

Thanks for tracking this down. I've been annoyed by it ever since it was introduced.

I think the 3rd behaviour (pasting a URL) is older, and I like that one.

But all the newer behaviour is really painful.

Kevin Buzzard (Nov 21 2024 at 08:34):

I was annoyed by it too, because I had adapted to the old behaviour and then it changed (eg I'd add the ` then paste a declaration name from VS Code and get another one). But all my annoyance vanished when I discovered that hitting ctrl-Z afterwards reverted to the original behaviour.

Junyan Xu (Nov 21 2024 at 09:04):

Yeah, given that it can be easily reverted (mostly for links to docs as Zulip has the docs# linkifier), I like the current behavior as it aligns with the experience on GitHub.

Eric Wieser (Nov 22 2024 at 01:19):

Kevin Buzzard said:

I was annoyed by it too, because I had adapted to the old behaviour and then it changed (eg I'd add the ` then paste a declaration name from VS Code and get another one). But all my annoyance vanished when I discovered that hitting ctrl-Z afterwards reverted to the original behaviour.

Unfortunately GitHub does not have this feature, Ctrl+Z also undoes earlier parts of your message


Last updated: May 02 2025 at 03:31 UTC