Document editor allows you to add comments to documents. You can add, navigate and remove comments in code and from the UI.
Comments can be inserted to the selected text.
this.documentEditor.editor.insertComment("Test comment");
Next and previous comments can be navigated using the below code snippet.
//Navigate to next comment
this.documentEditor.selection.navigateNextComment();
//Navigate to previous comment
this.documentEditor.selection.navigatePreviousComment();
Current comment can be be deleted using the below code snippet.
this.documentEditor.editor.deleteComment();
All the comments in the document can be deleted using the below code snippet.
this.documentEditor.editor.deleteAllComments();