# Type alias ReplyToolSettings

ReplyToolSettings: { allowAddNote?: boolean; allowAddReply?: boolean; allowAddReplyOtherUser?: boolean; allowChangeOtherUser?: boolean; allowChangeUserName?: boolean; allowDelete?: boolean; allowDeleteOtherUser?: boolean; allowStatus?: boolean; allowStatusOtherUser?: boolean; annotationFilter?: ((annotation: AnnotationBase, index: number, array: AnnotationBase[]) => undefined | boolean); annotationFocusColor?: string; autoExpandOnCommentAdd?: boolean; dateFormat?: string; readOnly?: boolean; useColoredIcons?: boolean; useRelativeDates?: boolean }

Settings for the Reply Tool.

#### Type declaration

- ##### `Optional` allowAddNote?: boolean

  Allows adding notes.

- ##### `Optional` allowAddReply?: boolean

  Allows adding replies.

- ##### `Optional` allowAddReplyOtherUser?: boolean

  Allows adding replies to notes created by other users.

- ##### `Optional` allowChangeOtherUser?: boolean

  Allows modifying notes created by other users.

- ##### `Optional` allowChangeUserName?: boolean

  Allows changing the user name.

- ##### `Optional` allowDelete?: boolean

  Allows deleting notes or replies.

- ##### `Optional` allowDeleteOtherUser?: boolean

  Allows deleting notes or replies created by other users.

- ##### `Optional` allowStatus?: boolean

  Allows setting a status on notes or replies.

- ##### `Optional` allowStatusOtherUser?: boolean

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

- ##### `Optional` annotationFilter?: ((annotation: AnnotationBase, index: number, array: AnnotationBase[]) => undefined | boolean)

  - - (annotation: AnnotationBase, index: number, array: AnnotationBase[]): 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.

      ### Returns

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

      ### Example

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

      #### Parameters

      - ##### annotation: AnnotationBase

        The annotation being evaluated.

      - ##### index: number

        The index of the annotation in the array.

      - ##### array: AnnotationBase[]

        The full list of annotations.

      #### Returns undefined | boolean

- ##### `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.

  ### Property

  The highlight color in hex format. This setting is also utilized in the `showAnnotationFocusOutline` method if the color parameter is not explicitly specified.

  ### Example

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

- ##### `Optional` autoExpandOnCommentAdd?: boolean

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

  ### Property

  Set to `true` to enable automatic expansion, or `false` to disable it.

  ### Example

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

- ##### `Optional` dateFormat?: string

  Specifies the custom format for absolute dates in comment headers.

  ### Property

  HH:MM"] - The format to use when displaying absolute dates. Ignored if `useRelativeDates` is `true`.

  ### Example

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

- ##### `Optional` readOnly?: boolean

  Enables read-only mode, preventing any modifications.

- ##### `Optional` useColoredIcons?: boolean

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

- ##### `Optional` useRelativeDates?: boolean

  Enables the use of relative dates in comment headers.

  ### Property

  `true`: Displays relative dates (e.g., "5 minutes ago").

  - `false`: Displays absolute dates instead.

  ### Example

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

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