How to use showdown.getOptions:
166 167 168 169 170 171 172 173 174 175
#### getOptions() ```js // Global var showdownGlobalOptions = showdown.getOptions(); //Local var thisConverterSpecificOptions = converter.getOptions(); ```
How to use showdown.getOption:
156 157 158 159 160 161 162 163 164 165
#### getOption() ```js // Global var myOption = showdown.getOption('optionKey'); //Local var myOption = converter.getOption('optionKey'); ```
How to use showdown.default:
24 25 26 27 28 29 30 31 32 33
catch (err) { console.log('Failed to generate ebook.', err); } }); const markdownToHtml = (bookConfig) => __awaiter(void 0, void 0, void 0, function* () { const converter = new showdown_1.default.Converter(); return yield Promise.all(bookConfig.chapters.map((chapter) => __awaiter(void 0, void 0, void 0, function* () { if (!(chapter === null || chapter === void 0 ? void 0 : chapter.contentPath)) throw new Error(`Undefined content path in chapter:\n\n${chapter}`); const contentFile = yield promises_1.default.readFile(chapter.contentPath);
How to use showdown.getDefaultOptions:
176 177 178 179 180 181 182 183 184
### Retrieve the default options You can get showdown's default options with: ```js var defaultOptions = showdown.getDefaultOptions(); ``` ### Valid Options
How to use showdown.setFlavor:
GitHub: BlueHatbRit/mdpdf
46 47 48 49 50 51 52 53 54 55
styleBlock: utils.getStyleBlock(cssStyleSheets), }; } function parseMarkdownToHtml(markdown, convertEmojis, enableHighlight) { showdown.setFlavor('github'); const options = { prefixHeaderId: false, ghCompatibleHeaderId: true, extensions: []
40
633
11
See more examples
How to use showdown.converter:
107 108 109 110 111 112 113 114 115
```js <script src="src/showdown.js" /> <script src="src/extensions/twitter.js" /> var converter = new Showdown.converter({ extensions: 'twitter' }); ``` ### Server-side Extension Usage
846
0
0
See more examples
How to use showdown.Converter:
GitHub: cardano-foundation/CIPs
2 3 4 5 6 7 8 9 10 11 12
const path = require('path') const rimraf = require('rimraf') const handlebars = require('handlebars') const showdown = require('showdown') const moment = require('moment') const converter = new showdown.Converter({ tables: true }) const publicPath = path.join(__dirname, '..', 'public') const templates = {}
218
403
70
See more examples