@verso-editor/importer-docx
v0.2.0
Published
Word (.docx) import utility for Verso Editor. Powered by [mammoth.js](https://github.com/mwilliamson/mammoth.js).
Downloads
18
Readme
@verso-editor/importer-docx
Word (.docx) import utility for Verso Editor. Powered by mammoth.js.
Install
pnpm add @verso-editor/importer-docxUsage
import { importDocx } from '@verso-editor/importer-docx'
const input = document.querySelector<HTMLInputElement>('input[type="file"]')!
const file = input.files![0]
const { html } = await importDocx(file)
editor.setContent(html)