Add enum to lineRule and create demo
This commit is contained in:
@ -1,6 +1,6 @@
|
||||
import { XmlComponent } from "file/xml-components";
|
||||
|
||||
import { Paragraph } from "../paragraph";
|
||||
import { LineRuleType, Paragraph } from "../paragraph";
|
||||
import { Footnote, FootnoteType } from "./footnote/footnote";
|
||||
import { ContinuationSeperatorRun } from "./footnote/run/continuation-seperator-run";
|
||||
import { SeperatorRun } from "./footnote/run/seperator-run";
|
||||
@ -40,7 +40,7 @@ export class FootNotes extends XmlComponent {
|
||||
spacing: {
|
||||
after: 0,
|
||||
line: 240,
|
||||
lineRule: "auto",
|
||||
lineRule: LineRuleType.AUTO,
|
||||
},
|
||||
children: [new SeperatorRun()],
|
||||
}),
|
||||
@ -57,7 +57,7 @@ export class FootNotes extends XmlComponent {
|
||||
spacing: {
|
||||
after: 0,
|
||||
line: 240,
|
||||
lineRule: "auto",
|
||||
lineRule: LineRuleType.AUTO,
|
||||
},
|
||||
children: [new ContinuationSeperatorRun()],
|
||||
}),
|
||||
|
@ -1,11 +1,18 @@
|
||||
// http://officeopenxml.com/WPspacing.php
|
||||
import { Attributes, XmlAttributeComponent, XmlComponent } from "file/xml-components";
|
||||
|
||||
export enum LineRuleType {
|
||||
AT_LEAST = "atLeast",
|
||||
EXACTLY = "exactly",
|
||||
AUTO = "auto",
|
||||
}
|
||||
export interface ISpacingProperties {
|
||||
readonly after?: number;
|
||||
readonly before?: number;
|
||||
readonly line?: number;
|
||||
readonly lineRule?: string;
|
||||
readonly lineRule?: LineRuleType;
|
||||
readonly beforeAutoSpacing?: boolean;
|
||||
readonly afterAutoSpacing?: boolean;
|
||||
}
|
||||
|
||||
class SpacingAttributes extends XmlAttributeComponent<ISpacingProperties> {
|
||||
|
@ -1,5 +1,7 @@
|
||||
import { UnderlineType } from "file/paragraph/run/underline";
|
||||
|
||||
import { LineRuleType } from "file/paragraph";
|
||||
|
||||
import { IBaseCharacterStyleOptions, StyleForCharacter } from "./character-style";
|
||||
import { IBaseParagraphStyleOptions, IParagraphStyleOptions, StyleForParagraph } from "./paragraph-style";
|
||||
|
||||
@ -121,7 +123,7 @@ export class FootnoteText extends StyleForParagraph {
|
||||
spacing: {
|
||||
after: 0,
|
||||
line: 240,
|
||||
lineRule: "auto",
|
||||
lineRule: LineRuleType.AUTO,
|
||||
},
|
||||
},
|
||||
run: {
|
||||
|
Reference in New Issue
Block a user