开发者

Help with changing how jWYSIWYG editor works

开发者 https://www.devze.com 2022-12-11 23:35 出处:网络
In jWYSIWYG editor, pushing enter inserts <br />s. Instead of this, I would prefer that pushing enter would wrap chunks in <p> tags.

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 in开发者_JAVA技巧ternally.

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


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

0

精彩评论

暂无评论...
验证码 换一张
取 消