#750 Add widow control
This commit is contained in:
13
src/file/paragraph/formatting/widow-control.ts
Normal file
13
src/file/paragraph/formatting/widow-control.ts
Normal file
@ -0,0 +1,13 @@
|
||||
// http://www.datypic.com/sc/ooxml/e-w_widowControl-1.html
|
||||
import { XmlAttributeComponent, XmlComponent } from "file/xml-components";
|
||||
|
||||
export class WidowControlAttributes extends XmlAttributeComponent<{ readonly val: boolean }> {
|
||||
protected readonly xmlKeys = { val: "w:val" };
|
||||
}
|
||||
|
||||
export class WidowControl extends XmlComponent {
|
||||
constructor(value: boolean) {
|
||||
super("w:widowControl");
|
||||
this.root.push(new WidowControlAttributes({ val: value }));
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user