Change docx folder to more appropriate "file" folder
This commit is contained in:
23
src/file/paragraph/formatting/spacing.ts
Normal file
23
src/file/paragraph/formatting/spacing.ts
Normal file
@ -0,0 +1,23 @@
|
||||
// http://officeopenxml.com/WPspacing.php
|
||||
import { XmlAttributeComponent, XmlComponent } from "../../xml-components";
|
||||
|
||||
export interface ISpacingProperties {
|
||||
after?: number;
|
||||
before?: number;
|
||||
line?: number;
|
||||
}
|
||||
|
||||
class SpacingAttributes extends XmlAttributeComponent<ISpacingProperties> {
|
||||
protected xmlKeys = {
|
||||
after: "w:after",
|
||||
before: "w:before",
|
||||
line: "w:line",
|
||||
};
|
||||
}
|
||||
|
||||
export class Spacing extends XmlComponent {
|
||||
constructor(opts: ISpacingProperties) {
|
||||
super("w:spacing");
|
||||
this.root.push(new SpacingAttributes(opts));
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user