From 02222c8681f40e5170c1e09a99194648e1f8d25c Mon Sep 17 00:00:00 2001 From: Thomas Jansen Date: Fri, 26 Nov 2021 19:33:40 +0100 Subject: [PATCH] change back docs to use settings as option directly --- docs/usage/change-tracking.md | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/docs/usage/change-tracking.md b/docs/usage/change-tracking.md index 977c69894d..e9ea9cb75e 100644 --- a/docs/usage/change-tracking.md +++ b/docs/usage/change-tracking.md @@ -53,8 +53,11 @@ In addition to marking text as inserted or deleted, change tracking can also be ```ts import { Document } from "docx"; -const doc = new Document({}); -doc.Settings.addTrackRevisions() +const doc = new Document({ + features: { + trackRevisions: true, + }, +}); ``` If you want to express a style changes, you can add a `revision` to a `TextRun` which need to include all previous style attributes.