emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Max Nikulin <manikulin@gmail.com>
To: emacs-orgmode@gnu.org
Subject: Re: Exporting Org file to Html with collapsable headings
Date: Fri, 21 Jan 2022 23:46:38 +0700	[thread overview]
Message-ID: <sseo1g$qtf$1@ciao.gmane.io> (raw)
In-Reply-To: <875yqduvju.fsf@posteo.net>

On 21/01/2022 19:23, Juan Manuel Macías wrote:
> ZIPING CHEN writes:
> 
>> I may have many things like this in the middle of the file.
>> ************************** a new heading.
>>
>> I wish to turn all layers of
>> headings in org file into collapsable headline to html.
>>
>> Does anybody know a way I can accomplish this?
> 
> I think that you need to add javascript and enclose the collapsible
> content in a div. 

Have a look at info "(org) JavaScript support" 
https://orgmode.org/manual/JavaScript-support.html (I have not tried 
that folding view).

HTML has <details><summary>header</summary>body</details> elements that 
works without JS, but it will require custom exporter.

You should ensure that deep headings can not be recognized as org inline 
tasks. Check ox-html, it may has limit on number of levels that are 
exported as headings with switching to lists for deeper structures.



  reply	other threads:[~2022-01-21 17:21 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-20 14:33 Exporting Org file to Html with collapsable headings ZIPING CHEN
2022-01-21 12:23 ` Juan Manuel Macías
2022-01-21 16:46   ` Max Nikulin [this message]
2022-01-22 18:20     ` xincheng99
2022-01-21 20:18 ` Tim Cross

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='sseo1g$qtf$1@ciao.gmane.io' \
    --to=manikulin@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).