Closed Bug 1028501 Opened 11 years ago Closed 5 years ago

Content in <pre> tags should have a 'Copy to clipoard' link

Categories

(developer.mozilla.org Graveyard :: Wiki pages, enhancement)

All
Other
enhancement
Not set
normal

Tracking

(Not tracked)

RESOLVED WONTFIX

People

(Reporter: ShellHacker, Unassigned)

Details

(Whiteboard: [specification][type:feature])

What problems would this solve? =============================== Sometimes the 'pre' tags have an scrollbar in case the code moves out of the main pre tag size. This sometimes makes it hard to copy the content in them related to build procedures. eg. ``` /Applications/FirefoxNightly.app/Contents/MacOS/firefox -profile /Users/bob/git/gaia/profile-debug -no-remote ``` We need to have a clipboard feature to copy all the content in the PRE tags. Who would use this? =================== Developers, People who love copy and paste, CMD+C, CMD+V What would users see? ===================== A small clipboard icon popping to the left side of the pre tag on hover ? eg. something like copying the SHA in github ? What would users do? What would happen as a result? =================================================== Clicking it would copy the innerHTML content to the clipboard. Is there anything else we should know? ======================================
Severity: normal → enhancement
Component: General → Wiki pages
Summary: Have <pre> tags have a copy to clipoard feature. → Content in <pre> tags should have a 'Copy to clipoard' link
FWIW, I still think we'd need to implement this via Flash, which is the only reliable way. There are APIs in different browsers but they either don't work or, like IE, they pop up a scary dialog.
I think GitHub uses ZeroClipboard to get this done, is it possible for MDN to use the same ?
We can, and I've implemented it before, we just need to decide if it's where we want to go.
What about a button that simply selects the whole text (making it easily copied)?
MDN Web Docs' bug reporting has now moved to GitHub. From now on, please file content bugs at https://github.com/mdn/sprints/issues/ and platform bugs at https://github.com/mdn/kuma/issues/.
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → WONTFIX
Product: developer.mozilla.org → developer.mozilla.org Graveyard
You need to log in before you can comment on or make changes to this bug.