- A search page that displays a grid of Tako knowledge cards based on a text query. You can either send the queries manually or rely on a built-in search bar.
- An edit page for customizing a Tako knowledge card (by modifying details like card title and series color).
Rendering the Plugin
The Tako plugin will be rendered by your app via iframes to different Tako URLs. For example:Authenticating the Plugin
Every time you load open a Tako iframe, you will need to authenticate the iframe with your API key. See the INIT_TAKO message documentation for more information.Communicating with the Plugin
Your app will communicate with Tako iframes (and vice versa) throughpostMessage calls. This is how the app and the plugin iframes will tell each other which actions to take and with what payload (search queries, knowledge card URLs, etc.).
You will both send messages to the plugin and listen for messages from the plugin.
These are the available message types:
INIT_TAKO
Initializes the Tako iframe with your API credentials and any configuration options. Since each iframe functions independently of others, your app needs to call this on every iframe load to authenticate and call Tako endpoints. Payload:SEARCH_TAKO
Triggers a search for Tako knowledge cards. Call this whenever you want to find and display Tako cards. If you includedhasSearchBar in your INIT_TAKO call, sending this message is
likely unnecessary since the plugin’s built-in search bar will handle searching instead.
Payload:
SELECT_TAKO_RESULT
Sent to your app from the Tako plugin whenever a user selects a Tako result, either by clicking on a card in the Tako search results or by selecting “Insert Card” in the Tako editor. You should listen for this event in your app and handle the payload as needed. Payload:OPEN_TAKO_EDITOR
Sent to your app from the Tako plugin whenever a user clicks the Edit button on a Tako search result. If a Tako card is editable and you have not disabled editing via thehasEdit param in INIT_TAKO,
an edit button will appear in the top right corner of the search result on hover.
You should listen for this event in your app and handle the payload as needed.
Payload:
CLOSE_TAKO_EDITOR
Sent to your app from the Tako plugin whenever a user clicks the Cancel button in the Tako editor You should listen for this event in your app. Payload:Theming the Plugin
Dark Mode
You can force dark or light mode on any plugin page (or Tako knowledge card) by appending?dark_mode=true or ?dark_mode=false to the src URL.
For example,
https://trytako.com/plugin/search/?dark_mode=true yields a search experience like this:

https://trytako.com/plugin/search/?dark_mode=false yields a search experience like this:

Demo Videos
Search
Edit