Where is the element of a highlight in the DOM or canvas?

41 views
Skip to first unread message

le zhang

unread,
Aug 27, 2023, 12:05:53 AM8/27/23
to zotero-dev
Hi there, 

I highlighted a string in a PDF tab but cannot find the highlight element in the Inspector, and I saw that the highlighted string didn't change in the HTML span. 

The highlight element cannot be picked, then I am wondering how I can get a highlight element? (How) can I modify the color of a highlight in script? (How) can I highlight the character rather than the background of a string? I edited the HTML span by surrounding the string by a tag with its color style as red, and its display as inline, but the character itself remained the same. 

Thanks in advance. 

Best

XY Wong

unread,
Aug 27, 2023, 12:12:57 AM8/27/23
to zotero-dev
It may cause confusion if the displayed color does not match the annotation color. Consider modifying the annotation data instead.

volatile static

unread,
Aug 27, 2023, 3:41:30 AM8/27/23
to zotero-dev
Hi, annotations in a PDF reader were rendered in a canvas by pdfjs, and I am wondering how to change it as well.

在2023年8月27日星期日 UTC+8 12:05:53<le zhang> 写道:
Message has been deleted

le zhang

unread,
Aug 27, 2023, 10:57:39 PM8/27/23
to zotero-dev
Yes, I get it. I can only inspect elements in DOM. Thanks!
Reply all
Reply to author
Forward
0 new messages