Word.ParagraphAddedEventArgs interface

Stellt Informationen zu den Absätzen bereit, die das paragraphAdded-Ereignis ausgelöst haben.

Hinweise

[ API-Satz: WordApi 1.6 ]

Beispiele

// Link to full sample: https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/25-paragraph/onadded-event.yaml

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

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

...

async function paragraphAdded(event: Word.ParagraphAddedEventArgs) {
  await Word.run(async (context) => {
    console.log(`${event.type} event detected. IDs of paragraphs that were added:`);
    console.log(event.uniqueLocalIds);
  });
}

Eigenschaften

source

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

type

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

uniqueLocalIds

Ruft die eindeutigen IDs der beteiligten Absätze ab. IDs befinden sich im STANDARD-GUID-Format 8-4-4-4-12 ohne geschweifte Klammern und unterscheiden sich zwischen Sitzungen und Mitautoren.

Details zur Eigenschaft

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.6 ]

type

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

type: 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.6 ]

uniqueLocalIds

Ruft die eindeutigen IDs der beteiligten Absätze ab. IDs befinden sich im STANDARD-GUID-Format 8-4-4-4-12 ohne geschweifte Klammern und unterscheiden sich zwischen Sitzungen und Mitautoren.

uniqueLocalIds: string[];

Eigenschaftswert

string[]

Hinweise

[ API-Satz: WordApi 1.6 ]