NicEdit Linebreak Issue – How to fix it

... veröffentlicht: 2008-02-12

NicEdit - Micro Inline WYSIWYGA lot of bloggers decided to use NicEdit to give their commentors a WYSIWYG editor to style the comment if needed.

NicEdit is a very slim JavaScript WYSIWYG editor which works break, except that some of us bloggers, like Matt at Webmaster-Source, Michael at ProBlogDesign or I myself, experience an odd error when it comes to simple linebreaks inserted by the editor itself.

If you use <br /> on your own, it will work properly. But who uses it if he or she has such a nice editor?

About a month ago I posted the issue on the NicEdit forum and got a reply which told me how to fix it. The author’s forum name of this fix is ihsan and I asked him for his ok about publishing the fix on my blog.

So far he did not reply, so I just go ahead and share it. Full credit for this fix goes to ihsan:

The Fix

open wp-includes/kses.php

find:
//   'br' => array(),

uncomment it: (remove //)
'br' => array(),

Save the file and you are done.

You can read the thread with the fix in the NicEdit forums.

P.S.: ihsan, if you read this, I like to add a link to your homepage/blog if you have one.

6 zu “NicEdit Linebreak Issue – How to fix it”

Nice.I’ll have to try that out.

redwall_hp’s last blog post..2008 U.S. Presidential Election: Candidates’ Sites Compared

It is a short and easy fix. Let me know if it turns out that it doesn’t work for you ;)

Now of course the main question which remains is why was it commented out in the first place :P .

Slevi’s last blog post..Happy valentine sweetie

I believe we have to ask the WordPress Devs about this ;)

it is made that way so that instead of the <br /> tag you can get a </p> with the enter. The best way to insert a <br /> tag instead of actually modifying the original code is to hold Shift then hit enter. (shift + enter). Hope this helps you guys

hi Marco
Thanks for sharing the information.I am just going to use it on my blog :) thank you very much.
@Jaime
thanks for sharing the tip.

Hinterlass einen Kommentar