UNPKG

961 BMarkdownView Raw
1# HTML Transformer
2
3Use `HtmlTransformer` to transform a CiceroMark DOM to/from an HTML String.
4
5## Installation
6
7```
8npm install @accordproject/markdown-html --save
9```
10
11## Usage
12
13``` javascript
14const CiceroMarkTransformer = require('@accordproject/markdown-cicero').CiceroMarkTransformer;
15const HtmlTransformer = require('@accordproject/markdown-html').HtmlTransformer;
16htmlTransformer = new HtmlTransformer();
17ciceroTransformer = new CiceroMarkTransformer();
18const json = ciceroTransformer.fromMarkdown(markdownText, 'json');
19const html = htmlTransformer.toHtml(json);
20```
21
22## License <a name="license"></a>
23Accord Project source code files are made available under the Apache License, Version 2.0 (Apache-2.0), located in the LICENSE file. Accord Project documentation files are made available under the Creative Commons Attribution 4.0 International License (CC-BY-4.0), available at http://creativecommons.org/licenses/by/4.0/.
24
25© 2017-2019 Clause, Inc.