From mboxrd@z Thu Jan 1 00:00:00 1970 From: Peter Davis Subject: Re: Getting checkboxes in HTML output? Date: Wed, 27 Nov 2013 13:20:59 -0500 Message-ID: <20131127182059.GB12765@pdavismbp15.iscinternal.com> References: <20131127154534.GA12765@pdavismbp15.iscinternal.com> <8738mhal2d.fsf@alphaville.bos.redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:49790) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Vljmq-0005Nl-0B for emacs-orgmode@gnu.org; Wed, 27 Nov 2013 13:24:37 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Vljmk-0001jY-FG for emacs-orgmode@gnu.org; Wed, 27 Nov 2013 13:24:31 -0500 Received: from out1-smtp.messagingengine.com ([66.111.4.25]:51256) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Vljmk-0001jR-7K for emacs-orgmode@gnu.org; Wed, 27 Nov 2013 13:24:26 -0500 Content-Disposition: inline In-Reply-To: <8738mhal2d.fsf@alphaville.bos.redhat.com> 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: Nick Dokos Cc: emacs-orgmode@gnu.org On Wed, Nov 27, 2013 at 11:03:38AM -0500, Nick Dokos wrote: > Peter Davis writes: > > > I noticed that HTML output contains "[ ]" and "[X]", just like the > > mark-up. Wouldn't it make sense to use actual unchecked or checked > > checkboxes in HTML? > > > > Is there a simple way to do this that I've overlooked? > > > > A cursory glance through ox-html.el uncovered this: > > --8<---------------cut here---------------start------------->8--- > (defun org-html-checkbox (checkbox) > "Format CHECKBOX into HTML." > (case checkbox (on "[X]") > (off "[ ]") > (trans "[-]") > (t ""))) > --8<---------------cut here---------------end--------------->8--- > > Maybe you can redefine this function to do what you want? Yes, this works: --8<---------------cut here---------------start------------->8--- (defun org-html-checkbox (checkbox) "Format CHECKBOX into HTML." (case checkbox (on "") (off "") (trans "[-]") (t ""))) --8<---------------cut here---------------end--------------->8--- Thank you! -pd