iarna / rtf-to-html

Convert RTF to HTML in pure JavaScript.
ISC License
64 stars 35 forks source link

not working in angular v8 #9

Open rsinghania opened 5 years ago

rsinghania commented 5 years ago

Tried given steps in the readme file but m not able to find method fromString() tried adding dependencies in the dev dependency but no luck.

jprules321 commented 5 years ago

I am using Angular 8 with Electron and I always get an HTML doc with empty body returned from fromString() even with RTF from the example.

public rtfToHtml(rtf: string): Promise<string> { return new Promise((resolve, reject) => { this.electron.rtf.fromString('{\\rtf1\\ansi\\b hi there\\b0}', (err, doc) => { if (err) { reject(err); } resolve(doc); }); }); }

returns

`<!DOCTYPE html>

`
Romick2005 commented 5 years ago

Can you please check it here https://github.com/iarna/rtf-to-html/pull/6?

Romick2005 commented 4 years ago

Can we close this?