FooSoft / anki-connect

Anki plugin to expose a remote API for creating flash cards.
https://foosoft.net/projects/anki-connect/
Other
1.94k stars 220 forks source link

Feature Request - Add a GUI action to preview a card #206

Open PaulBonnot opened 3 years ago

PaulBonnot commented 3 years ago

Hi, is it possible to have an action that given a cardId, asks Anki to preview the card (action available in the card browser) ?

snoyes commented 3 years ago

I recommend that instead of accepting a cardId, that this new endpoint simply call the browser's onTogglePreview(). You can call the existing guiBrowse endpoint with a query to select a particular cardId first.

PaulBonnot commented 3 years ago

Seems good to me, so basically there would be a new action guiTogglePreview that would show the preview if in the gui browser.