Image extraction and display of area annotation in notes

edited July 24, 2024
@hsiangyu_wong Hi, I am developing a script in Plugin "Actions & Tags" , which exports all annotations including area annotation, to notes in a format I set.
The exported notes enable 2-way syncing with Logseq.
However, I've encountered a problem with exporting area annotation.

Here's what I've done:

1. Found the URI of the area annotation
2. Converted the URI from base64 to png and placed the png in a new folder in storage (using the Zotero API to create the folder)
3. The HTML content in the note is like

<img data-attachment-key="4GF2MU2P" width="578" height="593" (here is a right angle bracket, I didn't find a way to escape it).

But the result is that the image doesn't display in the note, and when I export the note using Zotero Better Notes, the image appears as ![()]().

I'd appreciate any advice.
Does the folder in Zotero's storage still need to be synced with the database, requiring extra steps?

Sign In or Register to comment.