BookStackApp / BookStack

A platform to create documentation/wiki content built with PHP & Laravel
https://www.bookstackapp.com/
MIT License
15.31k stars 1.91k forks source link

allow middle-click copy/paste from code blocks #4561

Open jschueller opened 1 year ago

jschueller commented 1 year ago

Describe the feature you'd like

The Linux selection to copy text does not work on text inside code blocks. Eveywhere else selecting some text by drag selection with the mouse sends it to the clipboard, then I can paste it using the middle-click into another editor, shell prompt or whatever.

Describe the benefits this would bring to existing BookStack users

This would be practical to cherry-pick copy lines of code, but sadly that's the only text I cannot paste.

Can the goal of this request already be achieved via other means?

It can be achieved using CTRL-C/CTRL-V with the keyboard, but I have buttery fingers :]

Have you searched for an existing open/closed issue?

How long have you been using BookStack?

Under 3 months

Additional context

No response

ssddanbrown commented 1 year ago

Hi @jschueller, Thanks for the request.

I'm not sure this is something that's going to be simple to address though. From what I've found, it comes down to browser support. This doesn't work for me on Firefox, but does on Chrome. Our underlying library, codemirror, has to do a lot of it's own user selection management but Firefox does not regard scripted selection handling for this kind of clipboard system.