Skip to content

Commit 71a685d

Browse files
[Word] (preview) Update to next set (#976)
1 parent 4011ea0 commit 71a685d

File tree

5 files changed

+16
-13
lines changed

5 files changed

+16
-13
lines changed

playlists-prod/word.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -579,7 +579,7 @@
579579
https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/99-preview-apis/insert-and-change-content-controls.yaml
580580
group: Preview APIs
581581
api_set:
582-
WordApi: '1.9'
582+
WordApi: '1.10'
583583
- id: word-manage-comments
584584
name: Manage comments
585585
fileName: manage-comments.yaml
@@ -590,4 +590,4 @@
590590
https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/99-preview-apis/manage-comments.yaml
591591
group: Preview APIs
592592
api_set:
593-
WordApi: '1.9'
593+
WordApi: '1.10'

playlists/word.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -579,7 +579,7 @@
579579
https://raw.githubusercontent.com/OfficeDev/office-js-snippets/main/samples/word/99-preview-apis/insert-and-change-content-controls.yaml
580580
group: Preview APIs
581581
api_set:
582-
WordApi: '1.9'
582+
WordApi: '1.10'
583583
- id: word-manage-comments
584584
name: Manage comments
585585
fileName: manage-comments.yaml
@@ -590,4 +590,4 @@
590590
https://raw.githubusercontent.com/OfficeDev/office-js-snippets/main/samples/word/99-preview-apis/manage-comments.yaml
591591
group: Preview APIs
592592
api_set:
593-
WordApi: '1.9'
593+
WordApi: '1.10'

samples/word/99-preview-apis/insert-and-change-content-controls.yaml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ description: 'Inserts, updates, and retrieves content controls.'
44
author: OfficeDev
55
host: WORD
66
api_set:
7-
WordApi: '1.9'
7+
WordApi: '1.10'
88
script:
9-
content: |-
9+
content: |
1010
document.getElementById("insert-controls").addEventListener("click", () => tryCatch(insertContentControls));
1111
document.getElementById("change-controls").addEventListener("click", () => tryCatch(modifyContentControls));
1212
document.getElementById("set-state").addEventListener("click", () => tryCatch(setState));
@@ -74,7 +74,8 @@ script:
7474
async function setState() {
7575
// Sets the state of the first content control.
7676
await Word.run(async (context) => {
77-
const state = ((document.getElementById("state-to-set") as HTMLSelectElement).value as unknown) as Word.ContentControlState;
77+
const state = ((document.getElementById("state-to-set") as HTMLSelectElement)
78+
.value as unknown) as Word.ContentControlState;
7879
let firstContentControl = context.document.contentControls.getFirstOrNullObject();
7980
await context.sync();
8081
@@ -101,7 +102,7 @@ script:
101102
console.warn("There are no content controls in this document.");
102103
return;
103104
}
104-
105+
105106
firstContentControl.resetState();
106107
firstContentControl.load("id");
107108
await context.sync();
@@ -161,7 +162,7 @@ template:
161162
<button id="change-controls" class="ms-Button">
162163
<span class="ms-Button-label">Modify content controls</span>
163164
</button>
164-
<p />
165+
<h4>Preview features</h4>
165166
<span class="ms-font-m">Set state of first content control.</span>
166167
<br/>
167168
<label style="margin-left: 20px">State:</label>

samples/word/99-preview-apis/manage-comments.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: Manage comments
33
description: 'This sample shows how to perform operations on comments (including insert, reply, get, edit, resolve, and delete) and use comment events.'
44
host: WORD
55
api_set:
6-
WordApi: '1.9'
6+
WordApi: '1.10'
77
script:
88
content: |-
99
document.getElementById("register-event-handlers").addEventListener("click", () => tryCatch(registerEventHandlers));

snippet-extractor-output/snippets.yaml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18740,7 +18740,7 @@
1874018740
console.warn("There are no content controls in this document.");
1874118741
return;
1874218742
}
18743-
18743+
1874418744
firstContentControl.resetState();
1874518745
firstContentControl.load("id");
1874618746
await context.sync();
@@ -18796,7 +18796,8 @@
1879618796
// Sets the state of the first content control.
1879718797

1879818798
await Word.run(async (context) => {
18799-
const state = ((document.getElementById("state-to-set") as HTMLSelectElement).value as unknown) as Word.ContentControlState;
18799+
const state = ((document.getElementById("state-to-set") as HTMLSelectElement)
18800+
.value as unknown) as Word.ContentControlState;
1880018801
let firstContentControl = context.document.contentControls.getFirstOrNullObject();
1880118802
await context.sync();
1880218803

@@ -19701,7 +19702,8 @@
1970119702
// Sets the state of the first content control.
1970219703

1970319704
await Word.run(async (context) => {
19704-
const state = ((document.getElementById("state-to-set") as HTMLSelectElement).value as unknown) as Word.ContentControlState;
19705+
const state = ((document.getElementById("state-to-set") as HTMLSelectElement)
19706+
.value as unknown) as Word.ContentControlState;
1970519707
let firstContentControl = context.document.contentControls.getFirstOrNullObject();
1970619708
await context.sync();
1970719709

0 commit comments

Comments
 (0)