Word.ContentControlAddedEventArgs interface

Stellt Informationen zum Inhaltssteuerelement bereit, das das contentControlAdded-Ereignis ausgelöst hat.

Hinweise

[ API-Satz: WordApi 1.5 ]

Beispiele

// Link to full sample: https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/10-content-controls/content-control-onadded-event.yaml

// Registers the onAdded event handler on the document.
await Word.run(async (context) => {
  eventContext = context.document.onContentControlAdded.add(contentControlAdded);
  await context.sync();

  console.log("Added event handler for when content controls are added.");
});

...

async function contentControlAdded(event: Word.ContentControlAddedEventArgs) {
  await Word.run(async (context) => {
    console.log(`${event.eventType} event detected. IDs of content controls that were added:`, event.ids);
  });
}

Eigenschaften

eventType

Der Ereignistyp. Weitere Informationen finden Sie unter Word. EventType für Details.

ids

Ruft die Inhaltssteuerelement-IDs ab.

source

Die Quelle des Ereignisses. Sie kann lokal oder remote sein (durch gemeinsame Dokumenterstellung).

Details zur Eigenschaft

eventType

Der Ereignistyp. Weitere Informationen finden Sie unter Word. EventType für Details.

eventType: Word.EventType | "ContentControlDeleted" | "ContentControlSelectionChanged" | "ContentControlDataChanged" | "ContentControlAdded" | "CommentDeleted" | "CommentSelected" | "CommentDeselected" | "CommentChanged" | "CommentAdded" | "ContentControlEntered" | "ContentControlExited" | "ParagraphAdded" | "ParagraphChanged" | "ParagraphDeleted" | "AnnotationClicked" | "AnnotationHovered" | "AnnotationInserted" | "AnnotationRemoved" | "AnnotationPopupAction";

Eigenschaftswert

Word.EventType | "ContentControlDeleted" | "ContentControlSelectionChanged" | "ContentControlDataChanged" | "ContentControlAdded" | "CommentDeleted" | "CommentSelected" | "CommentDeselected" | "CommentChanged" | "CommentAdded" | "ContentControlEntered" | "ContentControlExited" | "ParagraphAdded" | "ParagraphChanged" | "ParagraphDeleted" | "AnnotationClicked" | "AnnotationHovered" | "AnnotationInserted" | "AnnotationRemoved" | "AnnotationPopupAction"

Hinweise

[ API-Satz: WordApi 1.5 ]

ids

Ruft die Inhaltssteuerelement-IDs ab.

ids: number[];

Eigenschaftswert

number[]

Hinweise

[ API-Satz: WordApi 1.5 ]

source

Die Quelle des Ereignisses. Sie kann lokal oder remote sein (durch gemeinsame Dokumenterstellung).

source: Word.EventSource | "Local" | "Remote";

Eigenschaftswert

Word.EventSource | "Local" | "Remote"

Hinweise

[ API-Satz: WordApi 1.5 ]