Creates a comment with the specified comment string. The current text selection defines the commented text.

<void> CommentCollection.add(<string> comment, [<AddCommentCallback> callback], [<ErrorCallback> errorCallback])

Parameters

Parameter Description
comment The comment string or null. Use null to open a text input box so that the end-user can type the comment's text for the currently selected text. The new comment is inserted after the text input box has been closed.
callback Optional. Receives the result of the add operation.
errorCallback Optional. Is called when the operation failed with an error.