typedoc-plugin-copy-code-to-clipboard
v1.1.2
Published
TypeDoc plugin copy code block
Downloads
315
Maintainers
Readme
Note: TypeDoc natively supports this in v0.24.5
typedoc-plugin-copy-code-to-clipboard
TypeDoc plugin that adds a button to copy code to clipboard for code blocks. See demo. Inspired by prototype.
Installation
NPM:
npm install typedoc-plugin-copy-code-to-clipboard --save-dev
Yarn:
yarn add typedoc-plugin-copy-code-to-clipboard --dev
TypeDoc automatically detected installed plugins. This plugin requires TypeDoc version ^0.23
.
Configuration
Add the plugin to typedoc.json
:
{
"entryPoints": ["src"],
"plugin": ["typedoc-plugin-copy-code-to-clipboard"]
}
Or specify the plugin when running the CLI command:
npx typedoc src --plugin typedoc-plugin-copy-code-to-clipboard
Development
Build the plugin:
npm run build # npm run build:watch
Generate the docs:
npm run docs
Open the docs:
open docs/index.html
Release
Release is automated with Release Please.