Unable to show highlight texts in the list

Hello there,
I am using version 7.2.1
I am unable to show my highlighted texts in the right sidebar(marked in the screenshot). My code is below:

const highlight = new Annotations.TextHighlightAnnotation();

highlight.Author = citationAuthor;
highlight.Quads = citation.quads;
highlight.PageNumber = citation.page;
highlight.Id = citation.id.toString();
highlight.Locked = true; // is editable or not
highlight.Subject = 'Citation';

annotManager.addAnnotation(highlight, true);

I am expecting this:

Getting this instead:

Hey there!

You need to set the Contents of the annotation in order for it to show up in the UI.

highlight.setContents('String to highlight')


1 Like