https://github.com/jgleitz/markdown-it-kbd
markdown-it plugin for keystrokes. Renders [[x]] as <kbd>x</kbd>
https://github.com/jgleitz/markdown-it-kbd
kbd keystrokes markdown markdown-it
Last synced: about 1 month ago
JSON representation
markdown-it plugin for keystrokes. Renders [[x]] as <kbd>x</kbd>
- Host: GitHub
- URL: https://github.com/jgleitz/markdown-it-kbd
- Owner: jGleitz
- License: mit
- Created: 2016-11-06T13:49:19.000Z (over 8 years ago)
- Default Branch: main
- Last Pushed: 2025-04-08T22:26:34.000Z (about 1 month ago)
- Last Synced: 2025-04-09T03:02:00.559Z (about 1 month ago)
- Topics: kbd, keystrokes, markdown, markdown-it
- Language: TypeScript
- Homepage:
- Size: 8.51 MB
- Stars: 23
- Watchers: 2
- Forks: 5
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# markdown-it-kbd [](https://travis-ci.org/jGleitz/markdown-it-kbd) [](https://badge.fury.io/js/markdown-it-kbd) [](https://badge.fury.io/bo/markdown-it-kbd)
> [markdown-it](https://github.com/markdown-it/markdown-it) plugin for keystrokesRenders `[[x]]` as `x`. ([``](http://www.w3schools.com/tags/tag_kbd.asp) is the tag for keystrokes).
## Usage
```js
const md = require('markdown-it')();
const kbd = require('markdown-it-kbd');md.use(kbd);
```This plugin can also be used together with [`markdown-it-attrs`](https://github.com/arve0/markdown-it-attrs/).
## Syntax notes
The end tag `]]` must be on the same line as the start tag `[[`.
The characters “`[`” and “`]`” are not allowed within keystroke tags.
If you need to use them, escape them with a backslash (i.e. `\[` or `\]`) or use HTML escape sequences (`[` for `[` or `]` for `]`).