privateOmega / html-to-docx

HTML to DOCX converter
MIT License
373 stars 140 forks source link

README.md does not show how to load the HTMLtoDOCX function #235

Open Pomax opened 7 months ago

Pomax commented 7 months ago

The README.md currently contains:

Installation

Use the npm to install foobar.

npm install html-to-docx

Usage

await HTMLtoDOCX(htmlString, headerHTMLString, documentOptions, footerHTMLString)

But this has two problems. First, the package isn't called foobar ("Use npm to install html-to-docx"), but more importantly, it's missing the code that shows how to get HTMLtoDOCX: is it import { HTMLtoDOCX } from "html-to-docx"? Is it import HTMLtoDOCX from "html-to-docx"? Is it something else?

It would be good to update the README.md to address this omission.

iamkhaya commented 5 months ago

Hi @Pomax

You can see how to use the library in React in the example.

https://github.com/privateOmega/html-to-docx/blob/master/example/react-example/src/App.js#L5

Pomax commented 5 months ago

I know, this issue is to get that information surfaced in the README.md instead, because that's where people expect to find it =)