Word.RevisionType enum

Определяет тип редакции.

Комментарии

Набор API: WordApiDesktop 1.4

Используется

Примеры

// Link to full sample: https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/50-document/track-moved-text.yaml

// Reads and selects the text associated with a tracked move.
await Word.run(async (context) => {
    const document: Word.Document = context.document;
    const revisions: Word.RevisionCollection = document.revisions;
    revisions.load("items/type");
    await context.sync();

    const movedFrom: Word.RevisionType = Word.RevisionType.movedFrom;
    const movedTo: Word.RevisionType = Word.RevisionType.movedTo;
    const movedRevision: Word.Revision | undefined = revisions.items.find(
        (revision: Word.Revision) => revision.type === movedFrom || revision.type === movedTo
    );
    if (!movedRevision) {
        console.log("Revision types found:", revisions.items.map((revision: Word.Revision) => revision.type));
        console.warn("No tracked move was found. Move an entire paragraph as described in the task pane; moving a phrase may produce insertion and deletion revisions instead.");
        return;
    }

    const movedRange: Word.Range = movedRevision.movedRange;
    movedRange.load("text");
    movedRange.select();
    await context.sync();

    console.log(`Moved revision range text: ${movedRange.text}`);
});

Поля

cellDeletion = "CellDeletion"

Редакция удаления ячейки.

cellInsertion = "CellInsertion"

Исправление вставки ячеек.

cellMerge = "CellMerge"

Редакция объединения ячеек.

cellSplit = "CellSplit"

Исправление разделения ячеек.

conflict = "Conflict"

Пересмотр конфликта.

conflictDelete = "ConflictDelete"

Конфликт, удаление, исправление.

conflictInsert = "ConflictInsert"

Конфликт, вставить исправление.

delete = "Delete"

Удалить редакцию.

displayField = "DisplayField"

Редакция поля отображения.

insert = "Insert"

Вставить исправление.

movedFrom = "MovedFrom"

Перемещено из ревизии.

movedTo = "MovedTo"

Перемещено в редакцию.

none = "None"

Без исправлений.

paragraphNumber = "ParagraphNumber"

Пересмотр номера абзаца.

paragraphProperty = "ParagraphProperty"

Пересмотр свойства абзаца.

property = "Property"

Пересмотр имущества.

reconcile = "Reconcile"

Согласование исправлений.

replace = "Replace"

Заменить исправление.

sectionProperty = "SectionProperty"

Пересмотр свойства раздела.

style = "Style"

Пересмотр стиля.

styleDefinition = "StyleDefinition"

Пересмотр определения стилей.

tableProperty = "TableProperty"

Пересмотр свойства таблицы.