Hello,
I am hitting a wall and can’t figure this out. I am using form helper to allow my clients to edit their pages. I am using the following code
<input type="hidden" name="{exp:form_helper:field_grabber field_name='body' which='format'}" value="xhtml" />
Which is supposed to put paragraph tags around items with a line break, right? Well, it works well the first time, but if you go in and edit a second time, it puts too many p tags in. Is it supposed to leave a br tag where there is just one line break and p tags where there are two?
Example html code before editing:
<div class="left">
<h1>Teachers and Staff [<a href="http://www.mchsf.com/index.php/about/edit_entry/11/">Edit</a>]</h1> <p><b>Curt Chamberlain, Director</b>
<br />
Curt earned his BA in Psychology with a focus on Early Childhood from the University of Oregon, and received his Montessori primary credential from the Maria Montessori Teacher Training Center. For over 20 years, Curt was at the Berkeley Montessori School (BMS), where he taught primary and lower elementary classes before going on to become head of school. After leaving BMS in 2000, he was named head of The Abiqua School in Oregon, followed by a stint as head of both The Barrie School in Silver Spring, Maryland and The Chesapeake Montessori School in Annapolis. Curt’s outside interests include Berkeley City Ballet, where he was a principal dancer for many years, as well as president of its Board of Directors. His other passions include Thai cooking, theatre, opera and film. Curt joined MCH in 2007.
</p>
But, when I open that page in the editor, it has two line breaks in the editor...and once saved, it converst the text to the following:
<div class="left">
<h1>Teachers and Staff [<a href="http://www.mchsf.com/index.php/about/edit_entry/11/">Edit</a>]</h1> <p><b>Curt Chamberlain, Director</b>
</p>
<p>
Curt earned his BA in Psychology with a focus on Early Childhood from the University of Oregon, and received his Montessori primary credential from the Maria Montessori Teacher Training Center. For over 20 years, Curt was at the Berkeley Montessori School (BMS), where he taught primary and lower elementary classes before going on to become head of school. After leaving BMS in 2000, he was named head of The Abiqua School in Oregon, followed by a stint as head of both The Barrie School in Silver Spring, Maryland and The Chesapeake Montessori School in Annapolis. Curt’s outside interests include Berkeley City Ballet, where he was a principal dancer for many years, as well as president of its Board of Directors. His other passions include Thai cooking, theatre, opera and film. Curt joined MCH in 2007.
</p>
Why is it transforming a perfectly good br tag into a p tag? It this the correct behavoir or am I doing something wrong?
