addCopyButton
addCopyButton(
codeBlock,getCode?):void
Defined in: client/code-block.ts:90
Adds a copy button to a code block. Requires styles from
prism-code-editor/copy-button.css.
Parameters
Section titled “Parameters”codeBlock
Section titled “codeBlock”Code block to add the copy button to.
getCode?
Section titled “getCode?”(codeBlock) => string
Function used to get the copied code. Can be used to e.g. omit deleted lines.
Returns
Section titled “Returns”void