views:

165

answers:

1

In jWYSIWYG editor, pushing enter inserts <br />s.

Instead of this, I would prefer that pushing enter would wrap chunks in <p> tags.

WHAT IS OUTPUT

line
<br />
new line

WHAT I WANT

<p>line</p>
<p>new line</p>

Quick examination of the config seems I can't do it without hacking it internally.

Do you suggest I hack the plugin, or use PHP to do it? The incoming HTML is parsed with HTML Purifier, so if that could do it, that would be great.

So - where should I do it, in the plugin or PHP? Any quick implementations of how to do it?

Thanks

+1  A: 

You could search replace <br>s with newlines, and then use %AutoFormat.AutoParagraph

Edward Z. Yang
Thanks - you are the author of HTMLPurifier yes? Good work!
alex