Skip to content

Commit 7687b93

Browse files
committed
feat: add prevent signature edits example
1 parent 8eb2177 commit 7687b93

File tree

2 files changed

+19
-0
lines changed

2 files changed

+19
-0
lines changed
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
import type { ImageAnnotation, InkAnnotation } 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+
isEditableAnnotation: (annotation) => {
8+
if ("isSignature" in annotation) {
9+
return !(annotation as InkAnnotation | ImageAnnotation).isSignature;
10+
}
11+
return true;
12+
},
13+
}).then(() => {});
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
category: signatures
3+
title: Prevent Signature Edits
4+
description: Prevents users from editing or modifying electronic signatures after they have been placed on the document.
5+
keywords: [signature, read-only, prevent edit, isEditableAnnotation, electronic signatures]
6+
---

0 commit comments

Comments
 (0)