You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[Word] Add snippets for APIs re pages, panes, windows (#974)
* [Word] Add snippets for APIs re pages, panes, windows
* Note some types
* Apply suggestions from code review
Co-authored-by: Alex Jerabek <38896772+AlexJerabek@users.noreply.github.com>
* Updates based on feedback
* remove jquery
* map objects
---------
Co-authored-by: Alex Jerabek <38896772+AlexJerabek@users.noreply.github.com>
"Themes and styles also help keep your document coordinated. When you click design and choose a new Theme, the pictures, charts, and SmartArt graphics change to match your new theme. When you apply styles, your headings change to match the new theme.",
175
+
"End"
176
+
);
177
+
body.insertText(
178
+
"Save time in Word with new buttons that show up where you need them. To change the way a picture fits in your document, click it and a button for layout options appears next to it. When you work on a table, click where you want to add a row or a column, and then click the plus sign.",
179
+
"Start"
180
+
);
181
+
body.insertParagraph(
182
+
"Do you want to create a solution that extends the functionality of Word? You can use the Office Add-ins platform to extend Word clients running on the web, on a Windows desktop, or on a Mac.",
183
+
"Start"
184
+
);
185
+
body.paragraphs
186
+
.getLast()
187
+
.insertText(
188
+
"Use add-in commands to extend the Word UI and launch task panes that run JavaScript that interacts with the content in a Word document. Any code that you can run in a browser can run in a Word add-in. Add-ins that interact with content in a Word document create requests to act on Word objects and synchronize object state.",
189
+
"Replace"
190
+
);
191
+
});
192
+
}
193
+
194
+
// Default helper for invoking an action and handling errors.
195
+
async function tryCatch(callback) {
196
+
try {
197
+
await callback();
198
+
} catch (error) {
199
+
// Note: In a production add-in, you'd want to notify the user through your add-in's UI.
200
+
console.error(error);
201
+
}
202
+
}
203
+
language: typescript
204
+
template:
205
+
content: |-
206
+
<section class="ms-Fabric ms-font-m">
207
+
This sample demonstrates how to work with pages, panes, and windows.
0 commit comments