Nutrient Web SDK

ReferenceIsEditableCommentCallback

Type Alias IsEditableCommentCallback

This callback can be run on individual comments to detect whether the comment can be edited based on its returned boolean.

For more information, see Configuration#isEditableComment

Type Alias
Type Signature
type IsEditableCommentCallback = (comment: NutrientViewer.Comment) => boolean

Example

Only allow the modification of comment from the same author.

NutrientViewer.load({
isEditableComment: function(comment) {
return comment.creatorName === myCurrentUser.name;
},
});

Type Declaration

Parameters

The comment.

Returns

boolean