Open chenpeizhen opened 3 years ago
@chenpeizhen what seems to be the problem 😂 why are you saving some garbage as msword file, and then act surprised that it wont open?
i suspect application/msword is a binary format.
you are basically taking plain text and use: document.querySelector('#myMessage').innerHTML
this can include HTML elements and what not. filesaver is not a conversion tool.
you might want to save it as:
const blob = new Blob([fileContent], {
type: "text/html",
})
saveAs(blob, title + '.html')
@jimmywarting She means after download the .doc file can't open on wechat and she was using iphone 12(maybe) .
gTranslate: The word file exported from html cannot be opened in WeChat, indicating that the file is corrupted, and it can be opened by downloading it directly on the computer