Delete
从文档中删除当前批注。
语法
expression.Delete();
expression - 表示 ApiComment 类的变量。
参数
此方法没有任何参数。
返回值
boolean
示例
此示例从文档中删除批注。
// How to remove a comment.
// Get all comments from the presentation and remove the first one.
let doc = Api.GetDocument();
let paragraph = doc.GetElement(0);
paragraph.AddText("This is just a sample text");
Api.AddComment(paragraph, "comment", "John Smith");
let comments = doc.GetAllComments();
comments[0].Delete();
paragraph = Api.CreateParagraph();
paragraph.AddText("The comment to the first paragraph was deleted");
doc.Push(paragraph);