style factory added and fixed bug allowing styles to work

This commit is contained in:
Dolan Miu
2016-05-09 03:44:16 +01:00
parent a1b4facb40
commit 9b268314e6
8 changed files with 53 additions and 16 deletions

View File

@ -46,10 +46,11 @@ export abstract class Packer {
prefix: "root"
});*/
var xmlDocument = xml(this.formatter.format(this.document));
console.log(xmlDocument);
var xmlStyle = xml(this.style);
var xmlStyle = xml(this.formatter.format(this.style));
//var xmlStyle = xml(this.style);
var xmlProperties = xml(this.formatter.format(this.properties), { declaration: { standalone: 'yes', encoding: 'UTF-8' } });
console.log(xmlStyle);
//console.log(JSON.stringify(this.formatter.format(this.document), null, " "));
//console.log(xmlDocument);
@ -57,9 +58,9 @@ export abstract class Packer {
name: 'word/document.xml'
});
//this.archive.append(xmlStyle, {
// name: 'word/newStyle.xml'
//});
this.archive.append(xmlStyle, {
name: 'word/styles.xml'
});
this.archive.append(xmlProperties, {
name: 'docProps/core.xml'