# Unable to show highlight texts in the list

**URL:** <https://pdfjs.community/t/unable-to-show-highlight-texts-in-the-list/506>\
**Category:** Technical Support\
**Tags:** pdfjs-express\
**Created:** [February 17, 2021, 4:47am UTC](https://pdfjs.community/t/unable-to-show-highlight-texts-in-the-list/506 "2021-02-17T04:47:57Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![ehtesham.ahmad.nadim](https://yyz1.discourse-cdn.com/flex031/user_avatar/pdfjs.community/ehtesham.ahmad.nadim/32/425_2.png) [@ehtesham.ahmad.nadim](https://pdfjs.community/u/ehtesham.ahmad.nadim)\
**Post date:** [February 17, 2021, 4:47am UTC](https://pdfjs.community/t/unable-to-show-highlight-texts-in-the-list/506/1 "2021-02-17T04:47:57Z")

</div>

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);
annotManager.drawAnnotations(highlight.PageNumber);

```

I am expecting this:

 ![Flowcite (7)](https://canada1.discourse-cdn.com/flex031/uploads/pdfjscommunity/original/1X/4c8e767b5b99b406a321275d95ecc3979b994d77.jpeg)

Getting this instead:

 ![Flowcite (6)](https://canada1.discourse-cdn.com/flex031/uploads/pdfjscommunity/original/1X/dab2130686ff000908b8bb861fa09297a57fb5e3.jpeg)

---

<div class="post-metadata">

**Author:** ![Logan](https://yyz1.discourse-cdn.com/flex031/user_avatar/pdfjs.community/logan/32/13_2.png) [@Logan](https://pdfjs.community/u/Logan)\
**Post date:** [February 17, 2021, 5:49pm UTC](https://pdfjs.community/t/unable-to-show-highlight-texts-in-the-list/506/2 "2021-02-17T17:49:47Z")

</div>

Hey there!

You need to [set the `Contents`](https://pdfjs.express/api/Annotations.TextHighlightAnnotation.html#setContents__anchor) of the annotation in order for it to show up in the UI.

```javascript
highlight.setContents('String to highlight')

```

Thanks!  
Logan
