Re: [Phphtmllib-devel] Textarea rendering behaviour.
Status: Beta
Brought to you by:
hemna
From: walt b. <wab...@3g...> - 2003-08-14 17:11:15
|
Mark Lawrence wrote: >Hi Walt, > > > >>Hi Mark, you are correct about browsers and the textarea content. I >>have the flag set by default on the tag to tell it not to render >>indentation on the tag at all. You can take a >> >> > >Ah, this was something I was not aware of, that you can set the >indentability of individual tags... > >What I did to get around it is set INDENT_LEFT_JUSTIFY on my "new >HTMLPageClass" statement, which of course indents nothing. > > > >>http://phphtmllib.newsblob.com/phphtmllib/examples/form2.php View the >>source, and you will see the textarea tag not being indented at all. >> >> > >Looks great! But how is it actually done? Having searched the API I found >the Container::set_indent_flag() method. But my question is now how do you >make it a default for all instances of a tag - ie all textareas. In fact, >wouldn't it be better for the TEXTAREA class itself to have this set to >false anyway? > >Cheers, Mark. > > As I said in my earlier email the tag itself has a flag that should make it never indent. Look at the tag_classes/ALLTAGS.inc on line 1449. class TEXTAREAtag extends HTMLTagClass { var $_tag = "textarea"; function _set_flags() { parent::_set_flags(); $this->_flags &= ~(_INDENT | _NEWLINEAFTEROPENTAG); } } // TEXTAREAtag If you look at the _flags setting, it is telling the tag to never indent, and never to put a newline character after the open tag is finished. If you have an example where this isn't happening it is a bug, and I would like to see it. Walt |