Files
docx-js/src/file/drawing/inline/graphic/graphic-data/pic/blip/blip.ts

26 lines
577 B
TypeScript
Raw Normal View History

import { XmlAttributeComponent, XmlComponent } from "file/xml-components";
2017-03-13 00:02:56 +00:00
2017-03-13 00:40:39 +00:00
interface IBlipProperties {
embed: string;
2018-01-16 00:43:00 +00:00
cstate: string;
2017-03-13 00:02:56 +00:00
}
class BlipAttributes extends XmlAttributeComponent<IBlipProperties> {
protected xmlKeys = {
embed: "r:embed",
2018-01-16 00:43:00 +00:00
cstate: "cstate",
2017-03-13 00:02:56 +00:00
};
}
export class Blip extends XmlComponent {
constructor(referenceId: number) {
super("a:blip");
2018-01-23 01:33:12 +00:00
this.root.push(
new BlipAttributes({
embed: `rId${referenceId}`,
cstate: "none",
}),
);
2017-03-13 00:02:56 +00:00
}
}