An open API service indexing awesome lists of open source software.

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

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




  1. 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
});
```