Closed ireina7 closed 2 years ago
@ireina7 it looks like there are two ways to achieve this. Note that I have performed only limited testing by pushing a single .org file to GitHub. I don't know yet if this works in issues, PRs, etc.
You can inline it like this:
#+HTML: <details> <summary> Click me</summary> and this part should be collapsed </details>
But there's no use for it since everything has to be on the same line. However, this:
#+begin_html
<details>
<summary>
Click me
</summary>
And this stuff will be collapsed.
Nullam eu ante vel est convallis dignissim. Fusce suscipit, wisi nec facilisis
facilisis, est dui fermentum leo, quis tempor ligula erat quis odio. Nunc porta
vulputate tellus. Nunc rutrum turpis sed pede. Sed bibendum. Aliquam posuere. Nunc
aliquet, augue nec adipiscing interdum, lacus tellus malesuada massa, quis varius mi
purus non odio. Pellentesque condimentum, magna ut suscipit hendrerit, ipsum augue
ornare nulla, non luctus diam neque sit amet urna. Curabitur vulputate vestibulum
lorem. Fusce sagittis, libero non molestie mollis, magna orci ultrices dolor, at
vulputate neque nulla lacinia eros. Sed id ligula quis est convallis tempor. Curabitur
lacinia pulvinar nibh. Nam a sapien.
</details>
#+end_html
For some mysterious reason appears to work
See Org Mode manual node Quoting HTML tags. "<" and ">" are escaped by default so that they are not interpreted as tags.
There are three ways to write HTML tags in Org:
some text @@html:your html here@@ some other text
#+html: your html here
#+begin_html
your html here
#+end_html
Thank you everyone.
In normal markdown files, I can use
<details>
and<summary>
to implement collapsible contents, e.g.Click me
hidden content
However, this function seems to be not supported in org-mode, please add this function which is very useful.