Make Paragraph declaritive
This commit is contained in:
@ -31,18 +31,12 @@ export class TableCell extends XmlComponent {
|
||||
public prepForXml(): IXmlableObject | undefined {
|
||||
// Cells must end with a paragraph
|
||||
if (!(this.root[this.root.length - 1] instanceof Paragraph)) {
|
||||
this.createParagraph();
|
||||
const para = new Paragraph({});
|
||||
this.addParagraph(para);
|
||||
}
|
||||
return super.prepForXml();
|
||||
}
|
||||
|
||||
public createParagraph(text?: string): Paragraph {
|
||||
const para = new Paragraph(text);
|
||||
this.addParagraph(para);
|
||||
|
||||
return para;
|
||||
}
|
||||
|
||||
public setVerticalAlign(type: VerticalAlign): TableCell {
|
||||
this.properties.setVerticalAlign(type);
|
||||
|
||||
|
Reference in New Issue
Block a user