added a new list paragraph style in the default style
This commit is contained in:
@ -2,7 +2,7 @@ import {Styles} from "./";
|
|||||||
import {DocumentDefaults} from "./defaults";
|
import {DocumentDefaults} from "./defaults";
|
||||||
import {ParagraphPropertiesDefaults} from "./defaults/paragraph-properties";
|
import {ParagraphPropertiesDefaults} from "./defaults/paragraph-properties";
|
||||||
import {RunPropertiesDefaults} from "./defaults/run-properties";
|
import {RunPropertiesDefaults} from "./defaults/run-properties";
|
||||||
import {Heading1Style, Heading2Style, TitleStyle, Heading3Style, Heading4Style, Heading5Style, Heading6Style} from "./style";
|
import {Heading1Style, Heading2Style, TitleStyle, Heading3Style, Heading4Style, Heading5Style, Heading6Style, ListParagraph} from "./style";
|
||||||
//import {StyleAttributes} from "./style/attributes";
|
//import {StyleAttributes} from "./style/attributes";
|
||||||
import {ParagraphProperties} from "../docx/paragraph/properties";
|
import {ParagraphProperties} from "../docx/paragraph/properties";
|
||||||
import {RunProperties} from "../docx/run/properties";
|
import {RunProperties} from "../docx/run/properties";
|
||||||
@ -46,6 +46,10 @@ export class DefaultStylesFactory {
|
|||||||
heading6Style.addRunProperty(new Color("1F4D78"));
|
heading6Style.addRunProperty(new Color("1F4D78"));
|
||||||
styles.push(heading6Style);
|
styles.push(heading6Style);
|
||||||
|
|
||||||
|
var listParagraph = new ListParagraph();
|
||||||
|
//listParagraph.addParagraphProperty();
|
||||||
|
styles.push(listParagraph);
|
||||||
|
|
||||||
console.log(JSON.stringify(styles, null, " "));
|
console.log(JSON.stringify(styles, null, " "));
|
||||||
return styles;
|
return styles;
|
||||||
}
|
}
|
||||||
|
@ -109,3 +109,13 @@ export class Heading6Style extends HeadingStyle {
|
|||||||
super("Heading6", "Heading 6");
|
super("Heading6", "Heading 6");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export class ListParagraph extends ParagraphStyle {
|
||||||
|
|
||||||
|
constructor() {
|
||||||
|
super("ListParagraph");
|
||||||
|
this.root.push(new Name("List Paragraph"));
|
||||||
|
this.root.push(new BasedOn("Normal"));
|
||||||
|
this.root.push(new QuickFormat());
|
||||||
|
}
|
||||||
|
}
|
Reference in New Issue
Block a user