Closed tahamandviwala4 closed 5 months ago
Possibly related to this? obsidian-callout-manager #15
If you just type the callout in using the base syntax does it work?
> [!Created Notes]
> yada yada yada
do you mean this ">[! ]
" by base syntax?
if yes, suggestions do not appear.
There must be a problem with the callout-manager plugin API. It doesn't return the custom created callouts.
Can you get the custom callout to even render if you type it in manually?
Can you get the custom callout to even render if you type it in manually?
Yes
If you look at the callout-manager API it seems to me that it adds custom callouts (e.g. ones created within the plugin) to the collection after initializing all of the other callout sources (builtin, theme, snippets, etc.)
// Create the callout collection.
// Use getCalloutProperties to resolve the callout's color and icon.
this.callouts = new CalloutCollection((id) => {
const { icon, color } = this.calloutResolver.getCalloutProperties(id);
console.debug('Resolved Callout:', id, { icon, color });
return {
id,
icon,
color,
};
});
// Add the custom callouts.
this.callouts.custom.add(...settings.callouts.custom);
The API function for getCallouts is just a call to this.plugin.callouts.values() getting the values of the above defined collection. Based on the above definition, you'd expect to see the callouts at the very bottom of the suggestion modal.
In the code for callout-manager's settings UI it does a comparison function to sort by icon (here) so you'll see a different sorting order in the settings UI vs the API call results.
After a fresh install of both plugins, I can find custom ones all the way at the bottom of the list:
You can try fuzzy finding your custom callouts with something like:
>!notes
If you look at the callout-manager API it seems to me that it adds custom callouts (e.g. ones created within the plugin) to the collection after initializing all of the other callout sources (builtin, theme, snippets, etc.)
This works for me. Thanks for helping :)
Callout suggestion only contains obsidian default callout and does not suggest the custom-created callouts. image from the callout manager plugin.
callout suggestions do not contain custom-callout.
Thanks for the plugin :)