wl-copy auto detects content copied, in my case it detects PHP code as application/x-php. However KDE then determines it’s not textual content (probably because it’s not one of text/plain, TEXT or sth), so I can’t paste the PHP code I copied from wl-copy.
KDE dev says:
We shouldn’t be converting from things that are simply wrong.
You can override the mimetype used by wl-paste with ‘-t’
However I think there should be a better approach, so I opened this discussion thread here.
My opinion is that KDE can use wl-paste as fall-back to convert it to text content. The auto detection and convertion is done by the Wayland clipboard tool set anyways, so there shouldn’t be any compatibility problem.
The way copy&paste works is that the “sending” applications offers its content in a set of formats.
The “receiving” application then picks the one it finds most suitable, upon which the “sender” starts transferring the data in that format to the “receiver”.
Anything that has a text input box, like the URL input box in the browser, reply input box in KDE Discuss, Alacritty the terminal, Typora the noting app e.t.c..
Ah, that shortcut doesn’t do anything for me but that could be my local setup.
Given that all applications in your test setup, likely across multiple vendors and toolkits, show similar behavior, it might be best to fix this at the source.
I.e. if wl-copy detects a subtype of text/plain it could also offer this as one of the formats.
It seems every “receiver” you have tried so far expects that.