Files
docx-js/src/file/track-revision/track-revision-components/inserted-text-run.ts

21 lines
675 B
TypeScript
Raw Normal View History

import { XmlComponent } from "@file/xml-components";
2020-10-10 13:41:26 +01:00
import { IRunOptions, TextRun } from "../../index";
import { ChangeAttributes, IChangedAttributesProperties } from "../track-revision";
interface IInsertedRunOptions extends IChangedAttributesProperties, IRunOptions {}
export class InsertedTextRun extends XmlComponent {
2022-08-31 07:52:27 +01:00
public constructor(options: IInsertedRunOptions) {
super("w:ins");
this.root.push(
new ChangeAttributes({
id: options.id,
author: options.author,
date: options.date,
}),
);
this.addChildElement(new TextRun(options as IRunOptions));
}
}