Skip to content

Commit 01dfd27

Browse files
committed
feat: add redaction annotation sidebar example
1 parent 5983ad0 commit 01dfd27

File tree

2 files changed

+28
-0
lines changed

2 files changed

+28
-0
lines changed
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
import type { Instance } from "@nutrient-sdk/viewer";
2+
import { baseOptions } from "../../shared/base-options";
3+
4+
window.NutrientViewer.load({
5+
...baseOptions,
6+
theme: window.NutrientViewer.Theme.DARK,
7+
initialViewState: new window.NutrientViewer.ViewState({
8+
sidebarOptions: {
9+
[window.NutrientViewer.SidebarMode.ANNOTATIONS]: {
10+
includeContent: [
11+
...window.NutrientViewer.defaultAnnotationsSidebarContent,
12+
window.NutrientViewer.Annotations.RedactionAnnotation,
13+
],
14+
},
15+
},
16+
}),
17+
}).then((instance: Instance) => {
18+
instance.setToolbarItems((items) => [
19+
...items,
20+
{ type: "redact-text-highlighter" },
21+
]);
22+
});
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
category: toolbar-menus
3+
title: Redaction Annotation Sidebar
4+
description: Configures the annotations sidebar to display redaction annotations and adds a text redaction tool to the toolbar.
5+
keywords: [redaction, sidebar, annotations, toolbar, text highlighter]
6+
---

0 commit comments

Comments
 (0)