Nutrient Web SDK

ReferenceOnCommentCreationStartCallback

Type Alias OnCommentCreationStartCallback

You can programmatically modify the properties of the comment just before it is created.

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

Example

Set default text of a Comment

NutrientViewer.load({
onCommentCreationStart: comment => comment.set('text', { format: 'xhtml', value: '<p>This comment has a default value</p>' })
// ...
});

Type Declaration

Parameters

The comment.

Returns