emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Specifying ATTR_HTML class for source blocks
@ 2019-10-03  8:10 Martin G. Skjæveland
  0 siblings, 0 replies; only message in thread
From: Martin G. Skjæveland @ 2019-10-03  8:10 UTC (permalink / raw)
  To: emacs-orgmode

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

<textarea cols="80" rows="1">My code
</textarea>

and, testing without ":textarea",

#+ATTR_HTML: :class testing
#+BEGIN_SRC n3
My code
#+END_SRC

gives

<pre class="src src-n3">My code
</pre>


Preferably, I want the following html:

<textarea cols="80" rows="1" class="testing">My code
</textarea>

Is there a way to achieve this?

Thanks,
Martin

[1] https://orgmode.org/manual/Text-areas-in-HTML-export.html

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2019-10-03  8:11 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-10-03  8:10 Specifying ATTR_HTML class for source blocks Martin G. Skjæveland

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).