emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Eric S Fraga <e.fraga@ucl.ac.uk>
To: Nick Dokos <ndokos@gmail.com>
Cc: "emacs-orgmode@gnu.org" <emacs-orgmode@gnu.org>
Subject: Re: adding "wrap=off" option to textarea for HTML export
Date: Fri, 9 Sep 2016 09:08:35 +0100	[thread overview]
Message-ID: <871t0t1on0.fsf@pinto.chemeng.ucl.ac.uk> (raw)
In-Reply-To: <69324c9e4bfc4fd3bd7df7882e857fd2@HE1PR01MB1898.eurprd01.prod.exchangelabs.com> (Nick Dokos's message of "Thu, 8 Sep 2016 17:54:36 +0000")

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

  parent reply	other threads:[~2016-09-09  8:11 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-08 15:49 adding "wrap=off" option to textarea for HTML export Eric S Fraga
2016-09-08 17:54 ` Nick Dokos
     [not found] ` <69324c9e4bfc4fd3bd7df7882e857fd2@HE1PR01MB1898.eurprd01.prod.exchangelabs.com>
2016-09-08 18:27   ` Eric S Fraga
2016-09-08 20:51     ` Nicolas Goaziou
     [not found]     ` <36a89fa2bafb4a0b84ff8ad6523d61a9@HE1PR01MB1898.eurprd01.prod.exchangelabs.com>
2016-09-10  9:20       ` Eric S Fraga
2016-09-09  8:08   ` Eric S Fraga [this message]
2016-09-09 15:32 ` Clément Pit--Claudel
     [not found] ` <0960a5432ed143b18552148fd5b67941@HE1PR01MB1898.eurprd01.prod.exchangelabs.com>
2016-09-09 16:06   ` Eric S Fraga

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=871t0t1on0.fsf@pinto.chemeng.ucl.ac.uk \
    --to=e.fraga@ucl.ac.uk \
    --cc=emacs-orgmode@gnu.org \
    --cc=ndokos@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).