Copy to clipboard

alfaNova

Well-known member
Hello XenForo team,

Considering this is a support forum where dozens of code snippets are shared daily, it would be highly beneficial to have a ‘Copy to Clipboard’ feature included by default in all code blocks. This small enhancement would significantly improve user experience by making it quicker and easier to copy code without manually selecting text — especially for longer or multiline examples.

Although addons exist to add this functionality, relying on third-party tools for such a basic feature isn’t ideal. Each addon introduces potential maintenance and compatibility concerns. By implementing this feature natively, the forum would reduce dependency on external addons while offering a smoother, more efficient experience for contributors and readers alike.
 
Upvote 20
It would be exceedingly easy to add since XenForo already has a function for it. The "Copy link" option from Bookmarks are just using the data-xf-init="copy-to-clipboard" mechanism that XenForo already has. So would be as simple as adding something to click (like an icon) and attaching that to it.

No new code needed.
 
Back
Top Bottom