Modifying decorations from another plugin

I’m writing a plugin for Obsidian MD ( that allows captions to be added to images (GitHub - bicarlsen/obsidian_image_caption: Add captions to images in Obsidian.). It seems that the images are being added as decorations based on the markdown code, and I would like to add the captions as a child to their widget decorations instead of adding them as a sibling widget.

Is it possbile to access the decorations added by another extension?

No, that’s not something the library makes possible, you’d have to somehow arrange for the code that creates the decorations to add a hook (facet, probably) for this.

Is there a way to list all the facets? Unfortunately they do not provide a comprehensive API or reference.

No. Facets are just values, and not registered anywhere centrally.

1 Like