Compartir a través de


Word.ContentControlAddedEventArgs interface

Proporciona información sobre el control de contenido que generó el evento contentControlAdded.

Comentarios

[ Conjunto de API: WordApi 1.5 ]

Ejemplos

// 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);
  });
}

Propiedades

eventType

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

ids

Obtiene los identificadores de control de contenido.

source

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

Detalles de las propiedades

eventType

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

eventType: 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.5 ]

ids

Obtiene los identificadores de control de contenido.

ids: number[];

Valor de propiedad

number[]

Comentarios

[ Conjunto de API: WordApi 1.5 ]

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