Word.ParagraphAddedEventArgs interface

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

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/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:`, 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" | "ContentControlEntered" | "ContentControlExited" | "ParagraphAdded" | "ParagraphChanged" | "ParagraphDeleted" | "AnnotationClicked" | "AnnotationHovered" | "AnnotationInserted" | "AnnotationRemoved";

Valor de propiedad

Word.EventType | "ContentControlDeleted" | "ContentControlSelectionChanged" | "ContentControlDataChanged" | "ContentControlAdded" | "ContentControlEntered" | "ContentControlExited" | "ParagraphAdded" | "ParagraphChanged" | "ParagraphDeleted" | "AnnotationClicked" | "AnnotationHovered" | "AnnotationInserted" | "AnnotationRemoved"

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 ]