feat(comments): Support comment pictures (#3032)
* feat(comments): Support comment pictures * fix(demo): Fix the image path to load the image correctly * fix(test): Update the number of files asserted in the compiler test case * feat(comments): Support comment pictures * fix(demo): Fix the image path to load the image correctly * fix(test): Update the number of files asserted in the compiler test case * style(src): Format the code and remove extra blank lines --------- Co-authored-by: Dolan <dolan_miu@hotmail.com>
This commit is contained in:
@ -1,4 +1,5 @@
|
||||
import { FileChild } from "@file/file-child";
|
||||
import { Relationships } from "@file/relationships";
|
||||
import { XmlAttributeComponent, XmlComponent } from "@file/xml-components";
|
||||
|
||||
export type ICommentOptions = {
|
||||
@ -136,6 +137,8 @@ export class Comment extends XmlComponent {
|
||||
}
|
||||
}
|
||||
export class Comments extends XmlComponent {
|
||||
private readonly relationships: Relationships;
|
||||
|
||||
public constructor({ children }: ICommentsOptions) {
|
||||
super("w:comments");
|
||||
|
||||
@ -178,5 +181,11 @@ export class Comments extends XmlComponent {
|
||||
for (const child of children) {
|
||||
this.root.push(new Comment(child));
|
||||
}
|
||||
|
||||
this.relationships = new Relationships();
|
||||
}
|
||||
|
||||
public get Relationships(): Relationships {
|
||||
return this.relationships;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user