https://github.com/takb/markflat.showdown
showdown.js extension for rendering markflat flavored markdown
https://github.com/takb/markflat.showdown
Last synced: 2 months ago
JSON representation
showdown.js extension for rendering markflat flavored markdown
- Host: GitHub
- URL: https://github.com/takb/markflat.showdown
- Owner: takb
- License: gpl-3.0
- Created: 2019-03-29T10:25:34.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2022-12-30T17:22:43.000Z (over 3 years ago)
- Last Synced: 2024-05-27T19:25:10.526Z (about 2 years ago)
- Language: JavaScript
- Size: 148 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# markflat.showdown
[showdown.js](https://github.com/showdownjs/showdown) extension for rendering markflat flavored markdown
## install
```sh
npm install takb/markflat.showdown
```
## use
```javascript
const showdown = require('showdown');
require('markflat.showdown');
var converter = new showdown.Converter({ extensions: ['markflat'] });
converter.makeHtml("# Title - Artist\n1. first verse {F} lyrics\n~Chorus {a7}lyrics of {C}chorus")
/* output:
Title - Artist
-
first verse F lyrics
-
a7lyrics of Cchorus
*/
```
## options
- **mbZoom** (default: `100`)
Zoom factor in %. If mbEnableZoom is set to true, prepends CSS style tag with `font-size: [mbZoom]%;` to converted html.
- **mbEnableZoom** (default: `false`)
- **mbTransposeBy** (default: `0`)
Number of transpose steps (-12 - +12). Requires mbTranspose to be a function that relies on this value.
- **mbTranspose**
Function to transpose the key of all chords in the document. Set only if you need to custmize the transposition function.
- **mbAddMinorChordMarker** (default: `false`)
If `true`, adds charcter 'm' to minor chords ('a7' => 'am7').
- **mbAddStyle** (default: `false`)
If `true`, prepends CSS style tag with styling form mbStyle to converted html.
- **mbStyle**
The CSS style string. Change to customize how converted HTML is rendered.
Example:
```javascript
var converter = new showdown.Converter({
extensions: ['markflat'],
mbEnableZoom: true,
mbAddStyle: true
});
```