Template:Copy

From Irony Wiki
Jump to navigation Jump to search

Documentation

Generates a button that will copy a certain string to the clipboard when clicked.

Error in widget Copy: unable to write file /var/www/html/ironywiki/extensions/Widgets/compiled_templates/wrt6631524e9057b1_98095179

Note that this only works on modern, up-to-date browsers. It will not work on Internet Explorer or old versions of modern browsers.

Usage[edit source]

{{copy|string to be copied|buttontext=button text|style=link (default) or button}}

  • string to be copied - Required. What should be copied to the clipboard.
  • buttontext= - Optional. What the button says. Default is "Copy to clipboard".
  • style= - Optional. Set style=button for it to be a nice clean button, or style=link for the button to mimic a link. Note that it doesn't mimic links very well. Default is link.

Examples[edit source]

{{copy|gaming}} outputs:

Error in widget Copy: unable to write file /var/www/html/ironywiki/extensions/Widgets/compiled_templates/wrt6631524e91f7d1_32094249

{{copy|dead chat xd|style=button|buttontext=dead chat xd}} outputs:

Error in widget Copy: unable to write file /var/www/html/ironywiki/extensions/Widgets/compiled_templates/wrt6631524e932f58_17341185

Template data[edit source]

Generates a button that will copy a string to the clipboard when clicked.

Template parameters[Edit template data]

This template prefers inline formatting of parameters.

ParameterDescriptionTypeStatus
Text to be copied1

What should be copied to the clipboard

Stringrequired
Stylestyle

Set to "button" for it to be a nice, clean, blue button. Set it to "link" for it to mimic a regular link (though it does not mimic links very well)

Default
link
Stringsuggested
Button textbuttontext

What is displayed on the button.

Default
Copy to clipboard
Stringsuggested