Spoiler box or html/markdown/LaTeX mixing

One can currently use the following spoiler box in obsidian using html:

Who is Fëanor?

Fëanor is a elf in J.R.R. Tolkien's Silmarillion. He creates some nice gemstones and makes a number of bad decisions.

This workaround has disadvantages.

  1. Typing the requisite code takes a non-trivial effort. I personally had to implement a textsnippet in autohotkey to be able to use it frequently.
  2. Obsidian does not support mixing html and markdown. This causes the following problems.
    • Bullet lists do not work in the environment.
    • Newline does not render as desired. Instead one has to type <br>.
    • LaTeX code will not be rendered as discussed over here

Some proposed solutions:

  • Implementing a spoiler box inside of obsidian.
  • Somehow allowing markdown and html to be mixed.
  • Making LaTeX usable inside of html.
1 Like

It’s really a good idea.
For the moment you can use the admonition plugin with a collapse. The bad thing about it, it uses code, so, if you want to use to hide some backlink, they don’t link in your graph (for example).

image
As you can see, no occurrence :confused:

1 Like

Thank you, that’s perfect for my purposes!

For any future readers, here’s a copyable example:

```ad-question
title: Who is Fëanor?
collapse: Fëanor is a elf in J.R.R. Tolkien's Silmarillion. He creates some nice gemstones and makes a number of bad decisions.
```

Also, if anyone uses autohotkey the following hotstring executes on typing µq + space and places your cursor at the title entry.

::µq::
SendRaw, `````` ad-question`rtitle: `ncollapse:`r``````` `r
SendInput, {left 15}
return
2 Likes

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.