1. Paragraphs were invented for a reason. Try modifying paragraph margins
   using CSS without using paragraph tags and you see what we mean.
   2. The IE WYSIWYG environment is built on handling paragraphs when it
   comes to alignment/list management and much more. TinyMCE and other editors
   will start producing lots of strange results if you enable
   
force_br_newlines<http://tinymce.moxiecode.com/wiki.php/Configuration:force_br_newlines>
   .
   3. The space between the paragraphs can be removed using a simple CSS
   trick like this. p {margin:0; padding: 0;}. This is not possible with BR
   elements, since the whole line is not wrapped in a container. So P elements
   gives you the flexibility to choose.
   4. If you really must have BR instead of paragraph elements for some
   reason – for example to interface with Flash or send e-mail messages –, then
   simply post process them away by replacing <p with <span and </p> with
   </span><br />, which takes care of P tags with class or style attributes.
   The same process but from BR tags to P tags can not be done since you don't
   have a reference for the start element.
   5. Paragraphs make more semantically correct XHTML markup, and we are
   trying to make an XHTML editor, not an old HTML editor.
   6. Paragraphs are mostly more valid containers for text in a W3C strict
   environment since plain text nodes are not allowed in all containers.
   7. BR elements can still be produced if you really need one at a specific
   place for some reason using Shift+Enter/Return this is exactly the same
   behavior popular Word processors have. Check this
video<http://screencast.com/t/ZDZmOTdj>
   .
   8. We have never seen one single valid reason why paragraphs must not be
   used unless it's for e-mail software or for integration with Flash, and both
   cases can and should be solved with post processing if you want the user to
   be able to modify the contents again with TinyMCE. If you have a good reason
   please drop us a e-mail describing it and I will put it on my exceptions
   list.


Copy - paste from web.
http://tinymce.moxiecode.com/wiki.php/TinyMCE_FAQ#TinyMCE_produce_P_elements_on_enter.2Freturn_instead_of_BR_elements.3F

http://stackoverflow.com/questions/1103594/p-instead-of-br

but, Perhaps double space can be transformed in <p>&nbsp;</p>

2011/5/17 JayShaffstall <[email protected]>

> On May 16, 4:30 pm, Massimo Di Pierro <[email protected]>
> wrote:
> > form=SQLFORM(...)
> > form.element('textarea')['_rows'] = random.randint(10,20)
>
> This works, in that the attributes are passed through to the HTML
> page.
>
> It doesn't work, in that the cols attribute seems to be ignored.  When
> I change rows, the number of rows changed in the HTML does change.
> When I change cols, it still displays the default number of columns.
>
> Here's the code I'm using in the controller:
>
>        form.element('textarea')['_rows']=30
>        form.element('textarea')['_cols']=80
>
> That generates the following HTML:
>
>        <textarea class="text" cols="80" id="contest_description"
> name="description" rows="30">
>
> 30 rows display, but the columns are still the default.
>
> Where could the number of columns for the text area be getting
> overriden?
>
>


-- 
 http://martin.tecnodoc.com.ar

Reply via email to