diff --git a/src/file/checkbox/checkbox.spec.ts b/src/file/checkbox/checkbox.spec.ts index 6e00b100a0..98e96e582b 100644 --- a/src/file/checkbox/checkbox.spec.ts +++ b/src/file/checkbox/checkbox.spec.ts @@ -13,6 +13,13 @@ describe("CheckBox", () => { "w:sdt": [ { "w:sdtPr": [ + { + "w:alias": { + _attr: { + "w:val": "Checkbox", + }, + }, + }, { "w14:checkbox": [ { @@ -84,6 +91,13 @@ describe("CheckBox", () => { "w:sdt": [ { "w:sdtPr": [ + { + "w:alias": { + _attr: { + "w:val": "Checkbox", + }, + }, + }, { "w14:checkbox": [ { @@ -152,6 +166,13 @@ describe("CheckBox", () => { "w:sdt": [ { "w:sdtPr": [ + { + "w:alias": { + _attr: { + "w:val": "Checkbox", + }, + }, + }, { "w14:checkbox": [ { diff --git a/src/file/checkbox/checkbox.ts b/src/file/checkbox/checkbox.ts index 9f8b55e4f2..f3ba88113c 100644 --- a/src/file/checkbox/checkbox.ts +++ b/src/file/checkbox/checkbox.ts @@ -12,11 +12,9 @@ export class CheckBox extends XmlComponent { public constructor(options?: ICheckboxSymbolOptions) { super("w:sdt"); - this.root.push( - new StructuredDocumentTagProperties(undefined, { - children: [new CheckBoxUtil(options)], - }), - ); + const properties = new StructuredDocumentTagProperties("Checkbox"); + properties.addChildElement(new CheckBoxUtil(options)); + this.root.push(properties); const content = new StructuredDocumentTagContent(); const checkedFont: string | undefined = options?.checkedState?.font;