Update CheckBox element and test file according to sdt-properties correction
This commit is contained in:
@ -13,6 +13,13 @@ describe("CheckBox", () => {
|
|||||||
"w:sdt": [
|
"w:sdt": [
|
||||||
{
|
{
|
||||||
"w:sdtPr": [
|
"w:sdtPr": [
|
||||||
|
{
|
||||||
|
"w:alias": {
|
||||||
|
_attr: {
|
||||||
|
"w:val": "Checkbox",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"w14:checkbox": [
|
"w14:checkbox": [
|
||||||
{
|
{
|
||||||
@ -84,6 +91,13 @@ describe("CheckBox", () => {
|
|||||||
"w:sdt": [
|
"w:sdt": [
|
||||||
{
|
{
|
||||||
"w:sdtPr": [
|
"w:sdtPr": [
|
||||||
|
{
|
||||||
|
"w:alias": {
|
||||||
|
_attr: {
|
||||||
|
"w:val": "Checkbox",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"w14:checkbox": [
|
"w14:checkbox": [
|
||||||
{
|
{
|
||||||
@ -152,6 +166,13 @@ describe("CheckBox", () => {
|
|||||||
"w:sdt": [
|
"w:sdt": [
|
||||||
{
|
{
|
||||||
"w:sdtPr": [
|
"w:sdtPr": [
|
||||||
|
{
|
||||||
|
"w:alias": {
|
||||||
|
_attr: {
|
||||||
|
"w:val": "Checkbox",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"w14:checkbox": [
|
"w14:checkbox": [
|
||||||
{
|
{
|
||||||
|
@ -12,11 +12,9 @@ export class CheckBox extends XmlComponent {
|
|||||||
public constructor(options?: ICheckboxSymbolOptions) {
|
public constructor(options?: ICheckboxSymbolOptions) {
|
||||||
super("w:sdt");
|
super("w:sdt");
|
||||||
|
|
||||||
this.root.push(
|
const properties = new StructuredDocumentTagProperties("Checkbox");
|
||||||
new StructuredDocumentTagProperties(undefined, {
|
properties.addChildElement(new CheckBoxUtil(options));
|
||||||
children: [new CheckBoxUtil(options)],
|
this.root.push(properties);
|
||||||
}),
|
|
||||||
);
|
|
||||||
|
|
||||||
const content = new StructuredDocumentTagContent();
|
const content = new StructuredDocumentTagContent();
|
||||||
const checkedFont: string | undefined = options?.checkedState?.font;
|
const checkedFont: string | undefined = options?.checkedState?.font;
|
||||||
|
Reference in New Issue
Block a user