There is another way for details tag => vanilla HTML.
Like this?
<details>
<summary><ruby>Like this?<rt>
[spoiler]かんじ[/spoiler]
</rt></ruby></summary>
That's right.
</details>
2 enter’s below the last tag will make Markdown possible inside HTML.