This design covers adding comments to both cloud and server macros and on draw.io diagrams only.
@Starter(macro) // get page Id from window.location page = Confluence.getPage(pageId) anchor = createAnchor(uuid) { p = findMacroPostion() newPage = updatePage(page, p, uuid) } Confluence.updatePage(pageId, newPage) commentId = Confluence.createComment(pageId, anchor) Save(commentId) { Confluence.updateContentProperty(commentId, anchorname) } |
@Starter(Browser) Macro.RenderComments() { comments = Confluence.getContentProerpty() foreach(comment) { commentId = comment.getId comment = Confluence.getComment(commentId) Render(comment) { // Comment can be resolved or deleted if(commentIsOpen) { show() } } } } |
Title | Link | Comment | |
---|---|---|---|
Add mention to Jira issue comment |
| ||
Create comments using the content REST API | |||
Custom macro content in an overlay | https://developer.atlassian.com/cloud/confluence/viewing-custom-macro-content-in-an-overlay/ | ||
userKey is deprecated | |||