Created
June 2, 2015 11:53
-
-
Save cromica/c755798e710a09b153aa to your computer and use it in GitHub Desktop.
sample code showing how to update a paragraph properties using integration API
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var segmentPair = _editorController.ActiveDocument.ActiveSegmentPair; | |
| var paragraphProperties = segmentPair.GetParagraphUnitProperties(); | |
| var newComment = _editorController.ActiveDocument.PropertiesFactory.CreateComment("Test Comment", "Test author", | |
| Severity.High); | |
| if (paragraphProperties.Comments==null) | |
| { | |
| paragraphProperties.Comments = _editorController.ActiveDocument.PropertiesFactory.CreateCommentProperties(); | |
| } | |
| if (paragraphProperties.Comments.Comments.All(x => x.Text != newComment.Text)) | |
| { | |
| paragraphProperties.Comments.Add(newComment); | |
| } | |
| _editorController.ActiveDocument.UpdateParagraphUnitProperties(paragraphProperties); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment