logo

NicEdit WYSIWYG alignment issue

logo

For those of you that don’t know NicEdit is a pretty awesome little WYSIWYG that is very easy to integrate into any website. Simple slap in a bit of javascript and away you go (well, pretty much).

Anyway, I noticed a small problem when trying to align text in firefox, it seemed to break my site completely and gave an error in firebug when clicked. This was a bit of a problem as it was something I needed to wysi’ to do.

After hunting around a little I found the perfect solution, however it required a bit of hacking of the NicEdit.js file.

The process:

  • Open up nicEdit.js and go to around line 37, it should start with something like “var nicEditors={nicPlugins:[],editors:[]…”
  • Search for “B.contentEditable”
  • This should return something like “if (B.contentEditable || !!window.opera)”
  • Simply replace this with: if ((B.contentEditable || !!window.opera) && navigator.userAgent.indexOf(“Firefox/3″) == -1)
  • Re-upload JS and you win!

Web2.0goodies has another possible solution to this problem if this method doesn’t work for you!

Leave a Reply

logo
logo
Powered by Wordpress | Designed by Elegant Themes