Convert html to rtf format in the browser
npm install html-to-rtf-browser> Highlight for the developers:
* Ozires for the base framework. Without him, we would not have this.
* Heron Silva for several improvements (as font-family support) (heronsilva / html-to-rtf)
* wodka for making it possible to use in browser (wodka/html-to-rtf).
* Leon Strauß for image support (MinePlay96/html-to-rtf).
If I missed some functionality in other forks, please let me know, or make a PR.
$ npm install html-to-rtf-browser
`
Getting Started
`javascript
const HtmlToRtfBrowser = require('html-to-rtf-browser');
var htmlToRtf = new HtmlToRtfBrowser();
var html = start of an image (with width and height defined):
end of an image
text of paragraph text with bold text with italic and boldtext with italic
red paragraph => right with tag
blue paragraph => center with style
| column 1 | column 2 | column 3 | column 4 |
| content 1 | content 2 | content 3 | content 4 |
const rtf = htmlToRtf.convertHtmlToRtf(html)
// from here on, works only on browser
const blob = new Blob([rtf], {type: "application/rtf;charset=utf-8"});
const link=window.URL.createObjectURL(blob);
window.location=link;`
> Now test in your preferred text editor (wordpad, word, libreoffice, ...).
####### Important:
#
> You can't copy the output of terminal or console.
> Save the output at a file.rtf. See above for an example
$3
`html
,
, , , , , , , , ,
, , , , , ,
, , , , ,
,