https://github.com/remarkablemark/typedoc-plugin-copy-code-to-clipboard
:clipboard: TypeDoc plugin copy code to clipboard
https://github.com/remarkablemark/typedoc-plugin-copy-code-to-clipboard
copy-to-clipboard npm npm-package typedoc typedoc-plugin typescript
Last synced: about 1 year ago
JSON representation
:clipboard: TypeDoc plugin copy code to clipboard
- Host: GitHub
- URL: https://github.com/remarkablemark/typedoc-plugin-copy-code-to-clipboard
- Owner: remarkablemark
- License: mit
- Created: 2023-01-28T20:30:45.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2024-05-27T23:27:33.000Z (about 2 years ago)
- Last Synced: 2024-05-28T08:46:03.541Z (about 2 years ago)
- Topics: copy-to-clipboard, npm, npm-package, typedoc, typedoc-plugin, typescript
- Language: TypeScript
- Homepage: https://b.remarkabl.org/typedoc-plugin-copy-code-to-clipboard
- Size: 2.38 MB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
- Codeowners: .github/CODEOWNERS
Awesome Lists containing this project
README
> **Note**: TypeDoc natively supports this in [v0.24.5](https://github.com/TypeStrong/typedoc/issues/2153)
# typedoc-plugin-copy-code-to-clipboard
[](https://nodei.co/npm/typedoc-plugin-copy-code-to-clipboard/)
[](https://www.npmjs.com/package/typedoc-plugin-copy-code-to-clipboard)
[](https://github.com/remarkablemark/typedoc-plugin-copy-code-to-clipboard/actions/workflows/build.yml)
[TypeDoc](https://github.com/TypeStrong/typedoc) plugin that adds a button to copy code to clipboard for code blocks. See [demo](https://b.remarkabl.org/typedoc-plugin-copy-code-to-clipboard). Inspired by [prototype](https://replit.com/@remarkablemark/Copy-code-to-clipboard).
## Installation
[NPM](https://www.npmjs.com/package/typedoc-plugin-copy-code-to-clipboard):
```sh
npm install typedoc-plugin-copy-code-to-clipboard --save-dev
```
[Yarn](https://yarnpkg.com/package/typedoc-plugin-copy-code-to-clipboard):
```sh
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`](https://typedoc.org/guides/options/):
```json
{
"entryPoints": ["src"],
"plugin": ["typedoc-plugin-copy-code-to-clipboard"]
}
```
Or specify the plugin when running the CLI command:
```sh
npx typedoc src --plugin typedoc-plugin-copy-code-to-clipboard
```
## Development
Build the plugin:
```sh
npm run build # npm run build:watch
```
Generate the docs:
```sh
npm run docs
```
Open the docs:
```sh
open docs/index.html
```
## Release
Release is automated with [Release Please](https://github.com/googleapis/release-please).
## License
[MIT](https://github.com/remarkablemark/typedoc-plugin-copy-code-to-clipboard/blob/master/LICENSE)