Files
docx-js/ts/docx/run/run-components/drawing/inline/graphic/index.ts

24 lines
621 B
TypeScript
Raw Normal View History

2017-03-13 00:40:39 +00:00
import { XmlAttributeComponent, XmlComponent } from "../../../../../xml-components";
2017-03-13 00:02:56 +00:00
import { GraphicData } from "./graphic-data";
2017-03-13 00:40:39 +00:00
interface IGraphicProperties {
a: string;
}
class GraphicAttributes extends XmlAttributeComponent<IGraphicProperties> {
protected xmlKeys = {
a: "xmlns:a",
};
}
export class Graphic extends XmlComponent {
2017-03-13 00:02:56 +00:00
constructor(referenceId: number) {
super("a:graphic");
2017-03-13 00:40:39 +00:00
this.root.push(new GraphicAttributes({
a: "http://schemas.openxmlformats.org/drawingml/2006/main",
}));
2017-03-13 00:02:56 +00:00
this.root.push(new GraphicData(referenceId));
}
}