Merge branch 'master' of github.com:dolanmiu/docx into feat/declaritive

# Conflicts:
#	src/file/paragraph/run/run.ts
This commit is contained in:
Dolan
2019-08-06 21:06:06 +01:00
14 changed files with 380 additions and 54 deletions

View File

@ -7,9 +7,13 @@ import {
BoldComplexScript,
Color,
DoubleStrike,
Highlight,
HighlightComplexScript,
Italics,
ItalicsComplexScript,
RightToLeft,
Shadow,
ShadowComplexScript,
Size,
SizeComplexScript,
Strike,
@ -140,4 +144,56 @@ export class Run extends XmlComponent {
this.root.push(new End());
return this;
}
public smallCaps(): Run {
this.properties.push(new SmallCaps());
return this;
}
public allCaps(): Run {
this.properties.push(new Caps());
return this;
}
public strike(): Run {
this.properties.push(new Strike());
return this;
}
public doubleStrike(): Run {
this.properties.push(new DoubleStrike());
return this;
}
public subScript(): Run {
this.properties.push(new SubScript());
return this;
}
public superScript(): Run {
this.properties.push(new SuperScript());
return this;
}
public font(fontName: string, hint?: string | undefined): Run {
this.properties.push(new RunFonts(fontName, hint));
return this;
}
public style(styleId: string): Run {
this.properties.push(new Style(styleId));
return this;
}
public highlight(color: string): Run {
this.properties.push(new Highlight(color));
this.properties.push(new HighlightComplexScript(color));
return this;
}
public shadow(value: string, fill: string, color: string): Run {
this.properties.push(new Shadow(value, fill, color));
this.properties.push(new ShadowComplexScript(value, fill, color));
return this;
}
}