[cl-who-devel] indent textarea

Hi, When I put the :indent option to true in with-html-output-to-string, the textarea is filled with spaces, even when it is not empty, a new line start with spaces behind it. Is there a way to put :indent to true without side effect on my textarea? Thanks Inge

Inge Bylemans wrote:
Hi,
When I put the :indent option to true in with-html-output-to-string, the textarea is filled with spaces, even when it is not empty, a new line start with spaces behind it. Is there a way to put :indent to true without side effect on my textarea?
(fmt "<textarea></textarea>") should do the trick. -jens

The princ is for entering the data from comment variable in the textarea, like :value for a input field. I don't know how else to get the data to be shown. On 3/13/07, Edi Weitz <edi@agharta.de> wrote:
On Tue, 13 Mar 2007 16:59:35 +0100, "Inge Bylemans" <ingebdh@gmail.com> wrote:
Now this is what I have: (:textarea :name "comment" :rows 3 :cols 50 (princ comment))
What is the PRINC supposed to do there? _______________________________________________ cl-who-devel site list cl-who-devel@common-lisp.net http://common-lisp.net/mailman/listinfo/cl-who-devel

On Wed, 14 Mar 2007 08:31:49 +0100, "Inge Bylemans" <ingebdh@gmail.com> wrote:
The princ is for entering the data from comment variable in the textarea, like :value for a input field. I don't know how else to get the data to be shown.
Reading the documentation might help in this case: http://weitz.de/cl-who/#syntax Look at STR, ESC, and FMT. Your PRINC will only work if the stream CL-WHO is currently writing to is *STANDARD-OUTPUT*.

On Tue, 13 Mar 2007 16:07:54 +0100, "Inge Bylemans" <ingebdh@gmail.com> wrote:
When I put the :indent option to true in with-html-output-to-string, the textarea is filled with spaces, even when it is not empty, a new line start with spaces behind it.
Yes, I'm aware of that. I personally don't mind as I only use the :INDENT option for debugging.
Is there a way to put :indent to true without side effect on my textarea?
Something like this (untested): (defmethod who:convert-tag-to-string-list :around ((tag (eql :textarea)) attr-list body body-fn) (let ((who::*indent* nil)) (call-next-method))) See <http://weitz.de/cl-who/#convert-tag-to-string-list>.

Inge Bylemans writes:
Hi,
When I put the :indent option to true in with-html-output-to-string, the textarea is filled with spaces, even when it is not empty, a new line start with spaces behind it. Is there a way to put :indent to true without side effect on my textarea?
What I do is to wrap the textarea in another with-html-output without :indent t, e.g. (with-html-output-to-string (s nil :prologue t :indent t) (with-html-output (s) (:textarea :name name :rows rows :cols cols (esc (or value ""))))) Cheers, Toby.
participants (4)
-
Edi Weitz
-
Inge Bylemans
-
Jens Teich
-
Toby Allsopp