[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [O] adding "wrap=off" option to textarea for HTML export
From: |
Eric S Fraga |
Subject: |
Re: [O] adding "wrap=off" option to textarea for HTML export |
Date: |
Fri, 9 Sep 2016 09:08:35 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/25.0.94 (gnu/linux) |
On Thursday, 8 Sep 2016 at 17:54, Nick Dokos wrote:
> Can you add a post-processing hook? A simple text replacement might be enough.
This worked very well:
#+begin_src emacs-lisp :exports results :results none
(defun add-wrap-to-textarea (text backend info)
(when (org-export-derived-backend-p backend 'html)
(replace-regexp-in-string "<textarea " "<textarea wrap=\"off\" " text)))
(add-to-list 'org-export-filter-final-output-functions 'add-wrap-to-textarea)
#+end_src
Thanks again,
eric
--
: Eric S Fraga (0xFFFCF67D), Emacs 25.0.94.1, Org release_8.3.4-655-g9fb077