This post goes over how to add a TypeDoc plugin to copy code to clipboard.
Install
Install typedoc
and the plugin:
npm install --save-dev typedoc typedoc-plugin-copy-code-to-clipboard
Configure
To build TypeDoc docs with the plugin, you can specify the plugin when running the CLI command:
npx typedoc src --plugin typedoc-plugin-copy-code-to-clipboard
Or add the plugin to typedoc.json
:
{
"entryPoints": ["src"],
"plugin": ["typedoc-plugin-copy-code-to-clipboard"]
}
Then build the docs:
npx typedoc
View the docs in your browser:
open docs/index.html