Word.EventType enum
提供有关引发的事件类型的信息。
注解
使用方
- Word.CommentEventArgs: type
- Word.ContentControlAddedEventArgs: eventType
- Word.ContentControlDataChangedEventArgs: eventType
- Word.ContentControlDeletedEventArgs: eventType
- Word.ContentControlEnteredEventArgs: eventType
- Word.ContentControlExitedEventArgs: eventType
- Word.ContentControlSelectionChangedEventArgs: eventType
- Word.ParagraphAddedEventArgs: type
- Word.ParagraphChangedEventArgs: type
- Word.ParagraphDeletedEventArgs: type
示例
// Link to full sample: https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/10-content-controls/content-control-ondeleted-event.yaml
async function contentControlDeleted(event: Word.ContentControlDeletedEventArgs) {
await Word.run(async (context) => {
console.log(`${event.eventType} event detected. IDs of content controls that were deleted:`, event.ids);
});
}
字段
| annotationClicked = "AnnotationClicked" | 表示在文档中使用 Alt+Down) 单击 (或选择批注。 |
| annotationHovered = "AnnotationHovered" | 表示文档中已悬停批注。 |
| annotationInserted = "AnnotationInserted" | 表示在文档中添加了一个或多个批注。 |
| annotationPopupAction = "AnnotationPopupAction" | 表示批注弹出窗口中的操作。 |
| annotationRemoved = "AnnotationRemoved" | 表示已从文档中删除一个或多个批注。 |
| commentAdded = "CommentAdded" | 表示添加了一条或多条新批注。 |
| commentChanged = "CommentChanged" | 表示注释或其回复已更改。 |
| commentDeleted = "CommentDeleted" | 表示已删除一条或多条批注。 |
| commentDeselected = "CommentDeselected" | 表示已取消选择注释。 |
| commentSelected = "CommentSelected" | 表示已选择注释。 |
| contentControlAdded = "ContentControlAdded" | ContentControlAdded 表示内容控件已添加到文档的事件。 |
| contentControlDataChanged = "ContentControlDataChanged" | ContentControlDataChanged 表示内容控件中的数据已更改的事件。 |
| contentControlDeleted = "ContentControlDeleted" | ContentControlDeleted 表示内容控件已被删除的事件。 |
| contentControlEntered = "ContentControlEntered" | 表示已进入内容控件。 |
| contentControlExited = "ContentControlExited" | 表示已退出内容控件。 |
| contentControlSelectionChanged = "ContentControlSelectionChanged" | ContentControlSelectionChanged 表示内容控件中的选择已更改的事件。 |
| paragraphAdded = "ParagraphAdded" | 表示添加了一个或多个新段落。 |
| paragraphChanged = "ParagraphChanged" | 表示一个或多个段落已更改。 |
| paragraphDeleted = "ParagraphDeleted" | 表示已删除一个或多个段落。 |