Copy button for code blocks within documentation
complete
E
Epsilon PS _ Paul Schiffer
I am recreating the feature request I sent to support in the past: Since the docs contain "$" and "#" in their commands to symbolize if the command should be executed as root/sudo or non-root/non-sudo, it makes copying it over to shell directly hard, especially multi-line command blocks. Therefore having a native copy button that would exclude the "$" or "#" would help immensely.
Log In
A
Arni from Webdock
complete
This has been completed and gone live today. We are reviewing all our docs pages to make sure it works everywhere and we have consistent code examples.
E
Epsilon PS _ Paul Schiffer
Arni from Webdock: I noticed today that the copy button scrolls with the text if a code block is too wide to be displayed completely. One example is the "Install base packages" block on the following page: https://webdock.io/en/docs/perfect-server-stacks/apache-stacks/ubuntu-lamp-81#:~:text=x%20mariadb_repo_setup%0A./mariadb_repo_setup-,Install%20base%20packages,-apt%2Dget%20update . Also see the attached image.
Furthermore, is it possible to extend the limits of the code block to the right so the copy button receives its own space? At the moment it blocks a few characters so I can't read the command fully before copying (See second attached image).


A
Arni from Webdock
Epsilon PS _ Paul Schiffer: The copy button should only show on hover, so as long as you move the mouse outside the area it should not block any characters.
As for the scroll-with-content issue, we will get that looked at. Thanks!
A
Arni from Webdock
planned
Yes! Sorry this was lost from our internal lists somehow. We will get on this soon.