Thread tagged as: Question, Blog, Redactor

Using tags in Perch blog post textareas

I'm having an issue when I try to embed html code in a blog post inside <code> tags. These <code> tags automatically get wrapped in <p> tags. I have html="true" set on the textarea in question, and am using the Redactor editor. All other html tags behave as expected without the <p> wrapping. Is there something I'm missing?

Michael Amis

Michael Amis 0 points

  • 5 years ago

Using <pre> tags seems to give better results although, the issue was also in part due to css styles.

Drew McLellan

Drew McLellan 2638 points
Perch Support

Can you show us your template tag?

Using the formatting dropdown in the Redactor toolbar gives best results for me but it uses the pre tag as you may have found. The editor can be also configured to add inline code tags by amending the formatting dropdown choices if you need that.