Use case or problem
The current spoiler syntax in Obsidian (e.g., >!spoiler text!<) is great for hiding content, but the default icons feel limiting in terms of visual customization and thematic alignment. In visually dense or themed vaults, especially those with custom CSS or community themes, the inability to replace the spoiler icon with a custom icon (e.g., an .ico, SVG, or even emoji) can break immersion or consistency in design. For users building knowledge gardens, wikis, or RPG campaign notes, having thematic control over these icons could really enhance the UX.
Proposed solution
Introduce an option, either via the core app or through an exposed CSS variable, to set a custom icon for spoiler toggles. Ideally, users could:
-
Specify a path to a local .ico, .svg, or image file to be used as the icon.
-
Use a plugin API hook for programmatic control (for plugin developers).
-
Or have a native setting in the appearance tab to select/replace spoiler icons with custom imagery.