Re-name paragraph styles
This commit is contained in:
@ -1,6 +1,6 @@
|
||||
import { BaseXmlComponent, ImportedXmlComponent, XmlComponent } from "file/xml-components";
|
||||
|
||||
import { CharacterStyle, ParagraphStyle } from "./style";
|
||||
import { StyleForCharacter, StyleForParagraph } from "./style";
|
||||
import { ICharacterStyleOptions } from "./style/character-style";
|
||||
import { IParagraphStyleOptions } from "./style/paragraph-style";
|
||||
export * from "./border";
|
||||
@ -9,7 +9,7 @@ export interface IStylesOptions {
|
||||
readonly initialStyles?: BaseXmlComponent;
|
||||
readonly paragraphStyles?: IParagraphStyleOptions[];
|
||||
readonly characterStyles?: ICharacterStyleOptions[];
|
||||
readonly importedStyles?: (XmlComponent | ParagraphStyle | CharacterStyle | ImportedXmlComponent)[];
|
||||
readonly importedStyles?: (XmlComponent | StyleForParagraph | StyleForCharacter | ImportedXmlComponent)[];
|
||||
}
|
||||
|
||||
export class Styles extends XmlComponent {
|
||||
@ -28,13 +28,13 @@ export class Styles extends XmlComponent {
|
||||
|
||||
if (options.paragraphStyles) {
|
||||
for (const style of options.paragraphStyles) {
|
||||
this.root.push(new ParagraphStyle(style));
|
||||
this.root.push(new StyleForParagraph(style));
|
||||
}
|
||||
}
|
||||
|
||||
if (options.characterStyles) {
|
||||
for (const style of options.characterStyles) {
|
||||
this.root.push(new CharacterStyle(style));
|
||||
this.root.push(new StyleForCharacter(style));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user