Template:Copy/doc

From Irony Wiki
Jump to navigation Jump to search

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/wrt6630c34d060bd2_57462289

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/wrt6630c34d07a887_20283558

{{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/wrt6630c34d08ff69_25167447

Template data[edit source]

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

Template parameters

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