Skip to content

Adds copy button to every markdown code block

Phil Hughes requested to merge ph/21172/copyCodeButton into master

What does this MR do and why?

Adds a copy button to every markdown code block. This is done by creating a custom element, copy-code, which sets up the correct DOM attributes on itself to copy the code block it is attatched to.

Screenshots or screen recordings

Screenshot_2021-12-03_at_11.53.31

How to set up and validate locally

Numbered steps to set up and validate the change are strongly suggested.

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Closes #21172 (closed)

Edited by Phil Hughes

Merge request reports