#1529 Add word break feature
This commit is contained in:
@ -3,11 +3,13 @@ import { XmlComponent } from "file/xml-components";
|
||||
|
||||
import { FootnoteReferenceRun } from "file/footnotes/footnote/run/reference-run";
|
||||
import { FieldInstruction } from "file/table-of-contents/field-instruction";
|
||||
|
||||
import { Break } from "./break";
|
||||
import { Begin, End, Separate } from "./field";
|
||||
import { NumberOfPages, NumberOfPagesSection, Page } from "./page-number";
|
||||
import { IRunPropertiesOptions, RunProperties } from "./properties";
|
||||
import { Text } from "./run-components/text";
|
||||
import { TextAttributes } from "./text-attributes";
|
||||
|
||||
export interface IRunOptions extends IRunPropertiesOptions {
|
||||
readonly children?: (Begin | FieldInstruction | Separate | End | PageNumber | FootnoteReferenceRun | string)[];
|
||||
@ -35,6 +37,10 @@ export class Run extends XmlComponent {
|
||||
}
|
||||
}
|
||||
|
||||
if (options.space) {
|
||||
this.root.push(new TextAttributes({ space: options.space }));
|
||||
}
|
||||
|
||||
if (options.children) {
|
||||
for (const child of options.children) {
|
||||
if (typeof child === "string") {
|
||||
|
Reference in New Issue
Block a user