diff --git a/ts/docx/run/run-components/drawing/inline/graphic/graphic-data/pic/blip/blip.ts b/ts/docx/run/run-components/drawing/inline/graphic/graphic-data/pic/blip/blip.ts index 12ae6b01e2..2926c52893 100644 --- a/ts/docx/run/run-components/drawing/inline/graphic/graphic-data/pic/blip/blip.ts +++ b/ts/docx/run/run-components/drawing/inline/graphic/graphic-data/pic/blip/blip.ts @@ -1,7 +1,7 @@ import { XmlAttributeComponent, XmlComponent } from "../../../../../../../../xml-components"; -export interface IBlipProperties { - embed?: string; +interface IBlipProperties { + embed: string; } class BlipAttributes extends XmlAttributeComponent { diff --git a/ts/docx/run/run-components/drawing/inline/graphic/index.ts b/ts/docx/run/run-components/drawing/inline/graphic/index.ts index f512e8ad5a..75dd24f75d 100644 --- a/ts/docx/run/run-components/drawing/inline/graphic/index.ts +++ b/ts/docx/run/run-components/drawing/inline/graphic/index.ts @@ -1,10 +1,24 @@ -import { XmlComponent } from "../../../../../xml-components"; +import { XmlAttributeComponent, XmlComponent } from "../../../../../xml-components"; import { GraphicData } from "./graphic-data"; + +interface IGraphicProperties { + a: string; +} + +class GraphicAttributes extends XmlAttributeComponent { + protected xmlKeys = { + a: "xmlns:a", + }; +} + export class Graphic extends XmlComponent { constructor(referenceId: number) { super("a:graphic"); + this.root.push(new GraphicAttributes({ + a: "http://schemas.openxmlformats.org/drawingml/2006/main", + })); this.root.push(new GraphicData(referenceId)); } }