Skip to content

Add copy button to code snippets #1003

@happyRip

Description

@happyRip

Summary

A copy button for commands in code snippets.

Why do we need this ?

Users could press the button to copy whole code snippets instead of having to highlight the command and copy it with more mouse clicks/key presses.

The feature request was mentioned in the comments as well #227 (comment)

What is already there? What do you see now?

The commands are neatly displayed for users in code blocks.
code-enlarged

What is missing? What do you want to see?

A button in a corner or above the code block to copy its content.
docs-code-copy-button

How do you propose to document this?

There are many guides explaining how to implement this feature:

Can you do this yourself and submit a Pull Request?

I can do this myself and submit a PR. The design of the button would have to be made by a designer.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions