docx icon indicating copy to clipboard operation
docx copied to clipboard

INFO How use Media object to embed file

Open ferlolo opened this issue 7 years ago • 5 comments

INFO i would like embed a file into a document, but i didn't find the documentation, can someone help me plz??? I only found https://docx.js.org/api/classes/media.html#addmedia, but i don't understand so good the information.

Regards

ferlolo avatar Mar 07 '19 16:03 ferlolo

Try this:

https://github.com/dolanmiu/docx/blob/master/demo/5-images.ts

dolanmiu avatar Mar 07 '19 17:03 dolanmiu

Hello,

Looks like that link is no longer active? Has that functionality been removed, or is there another script I can reference?

greekdude90 avatar Mar 06 '20 22:03 greekdude90

I have updated the link

dolanmiu avatar Mar 08 '20 20:03 dolanmiu

Hi dolanmiu,

Thanks for the quick response. I was wondering though about arbitrary objects. Like, embedding an excel sheet, word doc, txt file, etc.

Is that possible to do at this time?

Thanks!

greekdude90 avatar Mar 09 '20 14:03 greekdude90

Not possible unfortunately

dolanmiu avatar Mar 09 '20 20:03 dolanmiu