1 | # HTML Transformer
|
2 |
|
3 | Use `HtmlTransformer` to transform a CiceroMark DOM to/from an HTML String.
|
4 |
|
5 | ## Installation
|
6 |
|
7 | ```
|
8 | npm install @accordproject/markdown-html --save
|
9 | ```
|
10 |
|
11 | ## Usage
|
12 |
|
13 | ``` javascript
|
14 | const CiceroMarkTransformer = require('@accordproject/markdown-cicero').CiceroMarkTransformer;
|
15 | const HtmlTransformer = require('@accordproject/markdown-html').HtmlTransformer;
|
16 | htmlTransformer = new HtmlTransformer();
|
17 | ciceroTransformer = new CiceroMarkTransformer();
|
18 | const json = ciceroTransformer.fromMarkdown(markdownText, 'json');
|
19 | const html = htmlTransformer.toHtml(json);
|
20 | ```
|
21 |
|
22 | ## License <a name="license"></a>
|
23 | Accord 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.
|