From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?UTF-8?Q?Martin_G=2e_Skj=c3=a6veland?= Subject: Specifying ATTR_HTML class for source blocks Date: Thu, 3 Oct 2019 10:10:54 +0200 Message-ID: <9acd809d-994f-5f4b-276d-f609dd4865c2@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Return-path: Received: from eggs.gnu.org ([2001:470:142:3::10]:39369) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iFwCS-0006R4-I2 for emacs-orgmode@gnu.org; Thu, 03 Oct 2019 04:11:01 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iFwCQ-0008Om-Qg for emacs-orgmode@gnu.org; Thu, 03 Oct 2019 04:11:00 -0400 Received: from mail-lj1-x234.google.com ([2a00:1450:4864:20::234]:35918) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iFwCQ-0008OV-HU for emacs-orgmode@gnu.org; Thu, 03 Oct 2019 04:10:58 -0400 Received: by mail-lj1-x234.google.com with SMTP id v24so1636446ljj.3 for ; Thu, 03 Oct 2019 01:10:57 -0700 (PDT) Received: from [192.168.1.39] (233.92-221-22.customer.lyse.net. [92.221.22.233]) by smtp.gmail.com with ESMTPSA id w30sm293013lfn.82.2019.10.03.01.10.54 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 03 Oct 2019 01:10:55 -0700 (PDT) Content-Language: en-US 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" To: emacs-orgmode@gnu.org Hi all, I would like my source blocks to be exported to HTML as textareas with a class attribute -- so I can later use this in my javascript code. I can use ":textarea t" [1], but it seems that other attributes except width and height are ignored: #+ATTR_HTML: :textarea t :class testing #+BEGIN_SRC n3 My code #+END_SRC gives and, testing without ":textarea", #+ATTR_HTML: :class testing #+BEGIN_SRC n3 My code #+END_SRC gives
My code
Preferably, I want the following html: Is there a way to achieve this? Thanks, Martin [1] https://orgmode.org/manual/Text-areas-in-HTML-export.html