Just running the basic example shown in your README doesn't work.
$ npm install @iarna/rtf-to-html
+ @iarna/rtf-to-html@1.1.0
added 12 packages in 1.829s
$ cat index.js
const rtfToHTML = require('@iarna/rtf-to-html')
rtfToHTML.fromString('{\\rtf1\\ansi\\b hi there\\b0}', (err, html) => {
console.log(html)
// prints a document containing:
// <p><strong>hi there</strong></p>
});
$ node index.js
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<style>
body {
margin-left: 90pt;
margin-right: 90pt;
margin-top: 72pt;
margin-bottom: 72pt;
font-size: 12pt;
text-indent: 0pt;
}
</style>
</head>
<body>
</body>
</html>
There's no content inside the <body> tag, no matter what RTF you pass.
Just running the basic example shown in your README doesn't work.
There's no content inside the
<body>tag, no matter what RTF you pass.