sem sumário de edição
imported>Jaideraf Sem resumo de edição |
imported>Jaideraf Sem resumo de edição |
||
▲ "use strict";
let decodeEntities = (function
▲ // https://stackoverflow.com/questions/5796718/html-entity-decode
▲ // this prevents any overhead from creating the object each time
▲ let element = document.createElement("div");
}▼
}
return
}
})();▼
const doc = new Document({▼
creator: "Wikincat",▼
title: "Ficha catalográfica",▼
description: "Ficha catalográfica gerada pelo Wikincat"▼
});▼
//
let p = card.getElementsByTagName("p");▼
let card =
const borderParagraphStartCard = new Paragraph("").createBorder();▼
borderParagraphStartCard.Borders.addBottomBorder();▼
doc.addParagraph(borderParagraphStartCard);▼
doc.createParagraph("");▼
doc.createParagraph("");▼
let arrayP1 = p[1].innerHTML.split("<br>"); // 24X▼
arrayP1.forEach((item) => {▼
doc.createParagraph(decodeEntities(item));▼
});▼
let arrayP1 =
arrayP2.forEach((item) => {▼
doc.createParagraph(decodeEntities(item));▼
});▼
let arrayP2 =
▲ doc.createParagraph(decodeEntities(p[3].textContent)); // Track
doc.createParagraph(
if (p[4] !== undefined) {▼
doc.createParagraph(decodeEntities(p[3].textContent)); // Track
doc.createParagraph("");
arrayP4.forEach((item) => {▼
▲ doc.createParagraph(decodeEntities(item)).right();
});▼
}▼
▲ doc.createParagraph("");
▲ doc.createParagraph(decodeEntities(item)).right();
doc.createParagraph("");
const borderParagraphEndCard = new Paragraph("").createBorder();▼
borderParagraphEndCard.Borders.addTopBorder();▼
doc.addParagraph(borderParagraphEndCard);▼
▲ doc.createParagraph(document.getElementById("credit").textContent).center();
doc.createParagraph(document.getElementById("credit").textContent).center();
// Used to export the file into a .docx file▼
packer.toBlob(doc).then(blob => {▼
const packer = new
saveAs(blob, "Ficha.docx");▼
//console.log( "Documento criado com sucesso" );▼
▲ }
}
|