obsidian-mermaid icon indicating copy to clipboard operation
obsidian-mermaid copied to clipboard

Feature Request: Add Category

Open yoyoys opened this issue 9 months ago • 1 comments

Mermaid had more new diagrams and obsidian already supported like architecture diagram:

architecture-beta
  group api(cloud)[API]
	
	service db(database)[Database] in api
	service disk1(disk)[Storage] in api
	service disk2(disk)[Storage] in api
	service server(server)[Server] in api
	
	db:L -- R:server
	disk1:T -- B:server
	disk2:T -- B:db

If there an add category feature, it will be more flexible :)

yoyoys avatar Feb 13 '25 03:02 yoyoys

@yoyoys that'd be cool, but it'd require quite a bit of refactoring. Help will be appreciated!

dartungar avatar Feb 13 '25 10:02 dartungar

I came here looking for exactly that feature. I already have some custom Mermaid templates (currently only stored as text file), but I do not use these always, but only for certain topics. Think of it as having different style options for the same type of diagram. I would love to be able to create my own category and group these together in that category.

EnidanBri avatar Jun 21 '25 09:06 EnidanBri

OK, I messed around in the code a bit, and actually it wasn't hard to add a new category. So I have my custom category now. 😊😊 But I get why you mentioned "a lot of refactoring" because making that all flexible to be added by a used requires moving quite some elements to the data.json and out of the regular code, plus adding default object to the enums, plus adding UI for managing/adding custom categories... I would be willing to help. I know some Javascript (enough read it and make the changes above), but I have no idea about that whole Github thing. Only used it to download stuff so far. 🤣

EnidanBri avatar Jun 21 '25 11:06 EnidanBri

@yoyoys @EnidanBri I've finally gotten around to implementing custom categories in 1.3.0, along with settings overhaul! Hope it makes your day a little bit better ;)

dartungar avatar Aug 03 '25 11:08 dartungar