Forum

Thread tagged as: Question

perch:content in p tag output

I need a quick and stupid fix : I am wrapping some perch:content in a <p> tag with some classe appended to it. The output is two paragraphs : the one with the class and the other one with the content. First time i realize this. How to fix ? Thx

Content :

<p class="chapo"><perch:content id="chapo" type="textarea" label="Chapo" markdown="true" editor="markitup" size="m" divider-before="Chapo"/></p>

Output :

<p class="chapo"></p>
<p>test chapo</p>
DEVAUX Nicolas

DEVAUX Nicolas 0 points

  • 5 years ago

Just found the solution by replacing

markdown="true"

with

html="true"

I think it might be because you've got a html text editor in between the <p> tags, try removing the markdown so you using a plain textarea, assuming you don't need any html like bold etc...

<p class="chapo"><perch:content id="chapo" type="textarea" label="Chapo" size="m" divider-before="Chapo"/></p>

Thanks Glen, but just edited a solution above, seems to work :-)