Next: , Previous: Math formatting in HTML export, Up: HTML export

12.6.9 Text areas in HTML export

An alternative way to publish literal code examples in HTML is to use text areas, where the example can even be edited before pasting it into an application. It is triggered by :textarea attribute at an example or src block.

You may also use :height and :width attributes to specify the height and width of the text area, which default to the number of lines in the example, and 80, respectively. For example

     #+ATTR_HTML: :textarea t :width 40
       (defun org-xor (a b)
          "Exclusive or."
          (if a (not b) b))