I created the new plugin that allows you to change the callouts context menu.
About
One of the recent Obsidian updates make it more easy to edit callouts in live preview mode. When you right-click on the callout, you will see the context menu that allows you to select the callout type.
At first I was excited about this feature but then realised it is not very useful for me. Because I almost never use built in callouts and instead use a ton of my own custom callouts created with css. I also use some custom callout metadata. And you can’t add your own callouts to the context menu, you just stuck with what is built in.
Well, now you can! I just built a plugin that creates different context menu and allows you to decide which callouts options will be shown. It also allows you to add or remove collapsing, add or remove callout metadata or clear the callout formatting (without removing any of the markdown formatting inside).
What is the custom callouts?
In case if you don’t know, you can create your own callouts using css. It is described in detail here. Basically you should add the css-snippet like this:
.callout[data-callout="mycallout"] {
/* Your styles go here */
}
And to create you own callout metadata you use snippet like this:
.callout[data-callout-metadata*="mymetadata"] {
/* Your styles go here */
}
Metadata is anything that added to the callout name after the pipeline, like this:
> [!mycallout|mymetadata] Title
> Content
Callout metadata can be used to tweak the existing callout to change it’s style a little bit. You can use several metadata names at once. This plugin has two built in metadata types: “no-icon” and “no-title”, but you can create your own.
You can also create custom callouts using the Callout manager plugin. I don’t use if, but people who don’t know css may find it useful.
Plugin settings
To chose which callout types and metadata types should be shown in the context menu simply go to the plugin settings and edit the lists accordingly:
Installation
This plugin is not added to the official plugin list yet, so you can install it manually or using BRAT. Instruction can be found in the plugin readme.