From mboxrd@z Thu Jan 1 00:00:00 1970 From: Vincent Beffara Subject: Exported html structure Date: Mon, 27 Feb 2012 11:24:18 -0800 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Return-path: Received: from eggs.gnu.org ([208.118.235.92]:49902) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S26BU-0000AQ-RN for emacs-orgmode@gnu.org; Mon, 27 Feb 2012 14:24:33 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1S26BT-0000lC-Mf for emacs-orgmode@gnu.org; Mon, 27 Feb 2012 14:24:32 -0500 Received: from plane.gmane.org ([80.91.229.3]:58498) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S26BT-0000l7-Fp for emacs-orgmode@gnu.org; Mon, 27 Feb 2012 14:24:31 -0500 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1S26BP-0006Ud-CK for emacs-orgmode@gnu.org; Mon, 27 Feb 2012 20:24:27 +0100 Received: from 198.129.67.77 ([198.129.67.77]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 27 Feb 2012 20:24:27 +0100 Received: from vbeffara by 198.129.67.77 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 27 Feb 2012 20:24:27 +0100 List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org Hi, I would like to use jQuery to make the html exported by Org (un)foldable by clicking around, mimicking what tabbing does within emacs [except, I would like it if folding-and-unfolding-again kept open subtree as they were, which is a bit different from what org-mode does and is the root of my worry ...]. The structure of the HTML exported by Org is not optimal for that. Assume my org file looks like this, * Header 1 Some contents ** Header 1.1 Contents 1.1 ** Header 1.2 Contents 1.2 The HTML output looks like that (some details omitted):

Header 1

Some contents

Header 1.1

Contents 1.1

Header 1.2

Contents 1.2
There is a wrapper around each subtree, but within it things are a little too linear for what I want to do: it would be very useful to have a div containing the contents of each subtree, everything except the title, in addition to what there already is (so that one could hide it, unfold it on click to show the headers below, and so on). Something like this maybe:

Header 1

Some contents

Header 1.1

Contents 1.1

Header 1.2

Contents 1.2
Is that doable ? If so, how can I do it ? Is that a good idea ? I _can_ exploit jQuery with the current structure to hide/show all the children of a div.outline-2 that are not an h2, and that is my backup plan. I can also probably add the div I want by manipulating the DOM in jQuery but it sounds very sub-optimal. So I wanted to ask here for advice first ... What do you think ? Thanks for your help ! /vincent