AddComment
function AddComment(sText: string = null, sAuthor: string = null, sUserId: string = null): ApiComment
Description
Adds a comment to the current block content control. Please note that the current block content control must be in the document.
Parameters
- sText
string
null The comment text (required).
- sAuthor
string
null The author's name (optional).
- sUserId
string
null The user ID of the comment author (optional).
Returns
ApiComment
Try It
var oDocument = Api.GetDocument();
var oBlockLvlSdt = Api.CreateBlockLvlSdt();
oBlockLvlSdt.GetContent().GetElement(0).AddText("This is a block text content control.");
oDocument.AddElement(0, oBlockLvlSdt);
oBlockLvlSdt.AddComment("comment", "John Smith");