added more boilerplate files to drawing
This commit is contained in:
@ -2,4 +2,6 @@ export { Document } from "./document";
|
||||
export { Paragraph } from "./paragraph";
|
||||
export { Run } from "./run";
|
||||
export { TextRun } from "./run/text-run";
|
||||
export { PictureRun } from "./run/picture-run";
|
||||
export { Table } from "./table";
|
||||
// Perhaps all run related stuff can be exported from run, instead of exporting Run, TextRun, PictureRun seperately.
|
||||
|
10
ts/docx/run/picture-run.ts
Normal file
10
ts/docx/run/picture-run.ts
Normal file
@ -0,0 +1,10 @@
|
||||
import { Run } from "../run";
|
||||
import { Drawing } from "./run-components/drawing";
|
||||
|
||||
export class PictureRun extends Run {
|
||||
|
||||
constructor(imagePath: string) {
|
||||
super();
|
||||
this.root.push(new Drawing(imagePath));
|
||||
}
|
||||
}
|
@ -2,7 +2,7 @@ import { XmlComponent } from "../../../xml-components";
|
||||
|
||||
export class Drawing extends XmlComponent {
|
||||
|
||||
constructor() {
|
||||
constructor(imagePath: string) {
|
||||
super("w:drawing");
|
||||
}
|
||||
}
|
||||
|
@ -1,8 +0,0 @@
|
||||
import { XmlComponent } from "../../../xml-components";
|
||||
|
||||
export class Inline extends XmlComponent {
|
||||
|
||||
constructor() {
|
||||
super("w:drawing");
|
||||
}
|
||||
}
|
@ -0,0 +1,8 @@
|
||||
import { XmlComponent } from "../../../../../../xml-components";
|
||||
|
||||
export class Graphic extends XmlComponent {
|
||||
|
||||
constructor() {
|
||||
super("a:graphicData");
|
||||
}
|
||||
}
|
@ -0,0 +1,8 @@
|
||||
import { XmlComponent } from "../../../../../xml-components";
|
||||
|
||||
export class Graphic extends XmlComponent {
|
||||
|
||||
constructor() {
|
||||
super("a:graphic");
|
||||
}
|
||||
}
|
8
ts/docx/run/run-components/drawing/inline/index.ts
Normal file
8
ts/docx/run/run-components/drawing/inline/index.ts
Normal file
@ -0,0 +1,8 @@
|
||||
import { XmlComponent } from "../../../../xml-components";
|
||||
|
||||
export class Inline extends XmlComponent {
|
||||
|
||||
constructor() {
|
||||
super("wp:inline");
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user