-
Notifications
You must be signed in to change notification settings - Fork 64
/
word.annotationremovedeventargs.yml
65 lines (49 loc) · 1.96 KB
/
word.annotationremovedeventargs.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
### YamlMime:TSType
name: Word.AnnotationRemovedEventArgs
uid: 'word!Word.AnnotationRemovedEventArgs:interface'
package: word!
fullName: Word.AnnotationRemovedEventArgs
summary: Holds annotation information that is passed back on annotation removed event.
remarks: >-
\[ [API set: WordApi 1.7](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]
#### Examples
```TypeScript
// Link to full sample:
https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/50-document/manage-annotations.yaml
// Registers event handlers.
await Word.run(async (context) => {
eventContexts[0] = context.document.onParagraphAdded.add(paragraphChanged);
eventContexts[1] = context.document.onParagraphChanged.add(paragraphChanged);
eventContexts[2] = context.document.onAnnotationClicked.add(onClickedHandler);
eventContexts[3] = context.document.onAnnotationHovered.add(onHoveredHandler);
eventContexts[4] = context.document.onAnnotationInserted.add(onInsertedHandler);
eventContexts[5] = context.document.onAnnotationRemoved.add(onRemovedHandler);
eventContexts[6] = context.document.onAnnotationPopupAction.add(onPopupActionHandler);
await context.sync();
console.log("Event handlers registered.");
});
...
async function onRemovedHandler(args: Word.AnnotationRemovedEventArgs) {
await Word.run(async (context) => {
for (let id of args.ids) {
console.log(`AnnotationRemoved: ID ${id}`);
}
});
}
```
isPreview: false
isDeprecated: false
type: interface
properties:
- name: ids
uid: 'word!Word.AnnotationRemovedEventArgs#ids:member'
package: word!
fullName: ids
summary: Specifies the annotation IDs for which the event was fired.
remarks: '\[ [API set: WordApi 1.7](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]'
isPreview: false
isDeprecated: false
syntax:
content: 'ids: string[];'
return:
type: 'string[]'