Rocket.chat: Support for copy to clipboard

Created on 18 Apr 2016  路  3Comments  路  Source: RocketChat/Rocket.Chat

Your Rocket.Chat version: 0.26

I think there is no option (or I can't find it) for copying to clipboard (especially code blocks), which may be a very nice feature.

When you want to select a long block of code, the selection is very uncomfortable...

easy in progress

Most helpful comment

If anyone wants to make a PR for this one, it shouldn't be too hard:

Add a button [copy to clipboard] somewhere in the code block with a clipboard class and a data-clipboard-target that points to the code block, eg.:

<a class="clipboard" data-clipboard-target=".message#message_id code">{{_ "COPY_TO_CLIPBOARD"}}</a>

Needs testing, but that should be about it...

All 3 comments

If anyone wants to make a PR for this one, it shouldn't be too hard:

Add a button [copy to clipboard] somewhere in the code block with a clipboard class and a data-clipboard-target that points to the code block, eg.:

<a class="clipboard" data-clipboard-target=".message#message_id code">{{_ "COPY_TO_CLIPBOARD"}}</a>

Needs testing, but that should be about it...

Hi, I would like to start contribing to this project, I will submit a PR for this.

@diegoprates it is yours now :) please reference this ticket in your PR when ready. thanks

Was this page helpful?
0 / 5 - 0 ratings