this.container.documentEditor.currentUser= 'Nancy Davolio';
|
beforeCommentAction(args: CommentActionEventArgs): void {
if (args. author !== this.container.documentEditor.currentUser) {
args.type = 'Edit'; // you can modify the type based on your requirements
args.cancel = true;
DialogUtility.alert({
title: 'Information',
content: 'Edit restriction enabled. Only the author of the comment can delete it.',
showCloseIcon: true,
closeOnEscape: true,
});
}
}
|
commentDelete(args: CommentDeleteEventArgs): void {
if (args. author !== this.container.documentEditor.currentUser) {
args.cancel = true;
DialogUtility.alert({
title: 'Information',
content: 'Delete restriction enabled. Only the author of the comment can delete it.',
showCloseIcon: true,
closeOnEscape: true,
});
}
}
|