Word.ParagraphChangedEventArgs interface

Proporciona información sobre los párrafos que generaron el evento paragraphChanged.

Comentarios

[ Conjunto de API: WordApi 1.6 ]

Ejemplos

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

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

  console.log("Added event handler for when content is changed in paragraphs.");
});

...

async function paragraphChanged(event: Word.ParagraphChangedEventArgs) {
  await Word.run(async (context) => {
    console.log(`${event.type} event detected. IDs of paragraphs where content was changed:`);
    console.log(event.uniqueLocalIds);
  });
}

Propiedades

source

Origen del evento. Puede ser local o remota (a través de la coautoría).

type

El tipo de evento. Consulte Word. EventType para obtener más información.

uniqueLocalIds

Obtiene los identificadores únicos de los párrafos implicados. Los identificadores están en formato GUID estándar 8-4-4-4-12 sin llaves y difieren entre sesiones y coautores.

Detalles de las propiedades

source

Origen del evento. Puede ser local o remota (a través de la coautoría).

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

Valor de propiedad

Word.EventSource | "Local" | "Remote"

Comentarios

[ Conjunto de API: WordApi 1.6 ]

type

El tipo de evento. Consulte Word. EventType para obtener más información.

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

Valor de propiedad

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

Comentarios

[ Conjunto de API: WordApi 1.6 ]

uniqueLocalIds

Obtiene los identificadores únicos de los párrafos implicados. Los identificadores están en formato GUID estándar 8-4-4-4-12 sin llaves y difieren entre sesiones y coautores.

uniqueLocalIds: string[];

Valor de propiedad

string[]

Comentarios

[ Conjunto de API: WordApi 1.6 ]