Word.ParagraphDeletedEventArgs interface

paragraphDeleted イベントを発生させた段落に関する情報を提供します。

注釈

[ API セット: WordApi 1.6 ]

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

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

  console.log("Added event handlers for when paragraphs are deleted.");
});

...

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

プロパティ

source

イベントのソース。 ローカルまたはリモート (共同編集を使用) できます。

type

イベントの種類。 「Word」を参照してください。詳細については、EventType を参照してください。

uniqueLocalIds

関連する段落の一意の ID を取得します。 ID は標準の 8-4-4-4-12 GUID 形式で中かっこを使用せず、セッションと共同編集者によって異なります。

プロパティの詳細

source

イベントのソース。 ローカルまたはリモート (共同編集を使用) できます。

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

プロパティ値

Word.EventSource | "Local" | "Remote"

注釈

[ API セット: WordApi 1.6 ]

type

イベントの種類。 「Word」を参照してください。詳細については、EventType を参照してください。

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

プロパティ値

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

注釈

[ API セット: WordApi 1.6 ]

uniqueLocalIds

関連する段落の一意の ID を取得します。 ID は標準の 8-4-4-4-12 GUID 形式で中かっこを使用せず、セッションと共同編集者によって異なります。

uniqueLocalIds: string[];

プロパティ値

string[]

注釈

[ API セット: WordApi 1.6 ]