You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Feb 25, 2023. It is now read-only.
Repository navigation
This repository was archived by the owner on Feb 25, 2023. It is now read-only.
Anki integration: Definitions with images do not work #1741
For an upcoming monolingual dictionary we are making we are taking advantage of Yomichan's images and gaiji (structured-content) feature.
They display correctly in the extension but not without this CSS
Well done.
However, when you try to make an Anki card from it, the glossary field turns into [object Object]
Here are my Anki integration settings
I mainly use the handlebars.js featured on animecards.site, which adds the {test} field, which adds definitions to your cards in plain text. However, this does not matter here as stock handlebars.js and either {glossary} or {glossary-brief} have the exact same result
Yes, this is currently expected. Anki integration isn't implemented yet for either images or structured-content, and the "definition" text is a JSON object instead of a string, so handlebars stringifies it to "[Object object]". I'll have to make some changes to how Anki receives the images and formats the fields.
@toasted-nutbread I have a question regarding this.
Will fixing this require making additional changes to the dictionary? Or will that handled entirely by the add-on?
Activity
[-]Anki integration: Definitions with images break [/-][+]Anki integration: Definitions with images do not work[/+]shoui520 commentedon Jun 16, 2021
I have attached a test dictionary that includes the entries 藍, 亜 and 謎
test-dictionary.zip
toasted-nutbread commentedon Jun 16, 2021
Yes, this is currently expected. Anki integration isn't implemented yet for either images or structured-content, and the "definition" text is a JSON object instead of a string, so handlebars stringifies it to "[Object object]". I'll have to make some changes to how Anki receives the images and formats the fields.
shoui520 commentedon Jun 17, 2021
@toasted-nutbread I have a question regarding this.
Will fixing this require making additional changes to the dictionary? Or will that handled entirely by the add-on?
toasted-nutbread commentedon Jun 17, 2021
No changes required.