Merge pull request #179 from dolanmiu/feat/import-dotx

Feat/import dotx
This commit is contained in:
Dolan
2018-10-23 00:47:18 +01:00
committed by GitHub
40 changed files with 871 additions and 275 deletions

View File

@ -145,9 +145,13 @@ export class TableCell extends XmlComponent {
return this;
}
public prepForXml(): IXmlableObject {
public prepForXml(): IXmlableObject | undefined {
// Cells must end with a paragraph
const retval = super.prepForXml();
if (!retval) {
return undefined;
}
const content = retval["w:tc"];
if (!content[content.length - 1]["w:p"]) {
content.push(new Paragraph().prepForXml());