contextual spacing

This commit is contained in:
amitm02
2018-09-26 17:47:17 +03:00
parent ddd84a1765
commit 2fb5845501
3 changed files with 50 additions and 2 deletions

View File

@ -1,5 +1,5 @@
// http://officeopenxml.com/WPspacing.php
import { XmlAttributeComponent, XmlComponent } from "file/xml-components";
import { Attributes, XmlAttributeComponent, XmlComponent } from "file/xml-components";
export interface ISpacingProperties {
after?: number;
@ -23,3 +23,14 @@ export class Spacing extends XmlComponent {
this.root.push(new SpacingAttributes(opts));
}
}
export class ContextualSpacing extends XmlComponent {
constructor(value: boolean) {
super("w:contextualSpacing");
this.root.push(
new Attributes({
val: value === false ? 0 : 1,
}),
);
}
}