# ReplyToolSettings

## Content

# Type Alias: ReplyToolSettings

```ts
type ReplyToolSettings = object;
```

Settings for the Reply Tool.

## Properties

### allowAddNote?

```ts
optional allowAddNote: boolean;
```

Allows adding notes.

***

### allowAddReply?

```ts
optional allowAddReply: boolean;
```

Allows adding replies.

***

### allowAddReplyOtherUser?

```ts
optional allowAddReplyOtherUser: boolean;
```

Allows adding replies to notes created by other users.

***

### allowChangeOtherUser?

```ts
optional allowChangeOtherUser: boolean;
```

Allows modifying notes created by other users.

***

### allowChangeUserName?

```ts
optional allowChangeUserName: boolean;
```

Allows changing the user name.

***

### allowDelete?

```ts
optional allowDelete: boolean;
```

Allows deleting notes or replies.

***

### allowDeleteOtherUser?

```ts
optional allowDeleteOtherUser: boolean;
```

Allows deleting notes or replies created by other users.

***

### allowStatus?

```ts
optional allowStatus: boolean;
```

Allows setting a status on notes or replies.

***

### allowStatusOtherUser?

```ts
optional allowStatusOtherUser: boolean;
```

Allows setting a status on notes or replies created by other users.

***

### annotationFilter()?

```ts
optional annotationFilter: (annotation, index, array) => undefined | boolean;
```

Optional filter function to determine which annotations should be displayed in the Reply Tool.
If the function returns `true`, the annotation is shown; if `false`, it is hidden.
If not provided, the default behavior is used.

#### Parameters

##### annotation

[`AnnotationBase`](../classes/AnnotationBase)

The annotation being evaluated.

##### index

`number`

The index of the annotation in the array.

##### array

[`AnnotationBase`](../classes/AnnotationBase)[]

The full list of annotations.

#### Returns

`undefined` \| `boolean`

`true` to display the annotation, `false` to hide it.

#### Example

```javascript
// Show only text annotations in the Reply Tool
var viewer = new DsPdfViewer("#root", {
    replyTool: {
        annotationFilter: (annotation) => annotation.annotationType === 1 // AnnotationType.TEXT
    }
});
```

***

### annotationFocusColor?

```ts
optional annotationFocusColor: string;
```

Defines the color used for temporarily highlighting an annotation on the PDF page
when it is selected in the comments list within the Reply Tool.

#### Example

```javascript
var viewer = new DsPdfViewer("#root", { replyTool: { annotationFocusColor: "blue" } });
```

***

### autoExpandOnCommentAdd?

```ts
optional autoExpandOnCommentAdd: boolean;
```

Controls whether the Reply Tool automatically expands when a comment is added via the context menu.

#### Example

```javascript
// Disable automatic expansion of the Reply Tool.
var viewer = new DsPdfViewer("#root", { replyTool: { autoExpandOnCommentAdd: false } });
```

***

### dateFormat?

```ts
optional dateFormat: string;
```

Specifies the custom format for absolute dates in comment headers.

#### Example

```javascript
// Use a custom format for absolute dates.
var viewer = new DsPdfViewer("#root", { replyTool: { useRelativeDates: false, dateFormat: "dd.mm.yyyy HH:MM" } });
```

***

### readOnly?

```ts
optional readOnly: boolean;
```

Enables read-only mode, preventing any modifications.

***

### useColoredIcons?

```ts
optional useColoredIcons: boolean;
```

If set to `true`, comment icons will be filled with the color used in the annotation.

***

### useRelativeDates?

```ts
optional useRelativeDates: boolean;
```

Enables the use of relative dates in comment headers.

#### Example

```javascript
// Enable relative dates (default behavior).
var viewer = new DsPdfViewer("#root", { replyTool: { useRelativeDates: true } });

// Disable relative dates.
var viewer = new DsPdfViewer("#root", { replyTool: { useRelativeDates: false } });
```
