Is there an API for getting the "Confluence Page high-lighted text" on which an "inline comment" has been posted

I am developing an in-house plugin for fetching all the open,resolved,reopen inline comments on confluence.

I can fetch the inline comments and the CommentStatus using the below APIs

ContentEntityObject contentEntityObject = page.getEntity();
List<Comment> contentCommentList = contentEntityObject.getComments();


I can’t find an API in the confluence document for fetching me the (high-lighted) text on which the comment (inline comment) has been placed.

I tried using comment.getLinkWikiMarkup() but it seems to give me some number which I am not sure would be useful.

How can I fetch the highlighted text on the confluence?

Hi @kshi.korde,
You can get the highlighted text for an inline comment by getting a content property named “inline-original-selection”, for example:

1 Like

Thanks a ton. Will make use of this in my plugin.

Hi @ttranminh, if highlighted text are too long, it will be ‘cut’, how can I get full highlighted text?