Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Javascript NiceEdit Configuration

I'm trying to use nicedit

Currently I'm using this to add nicedit to all text areas:

<script src="http://js.nicedit.com/nicEdit-latest.js" type="text/javascript"></script>
<script type="text/javascript">bkLib.onDomLoaded(nicEditors.allTextAreas);</script>

How do I configure these wysiwygs? I found I can configure single boxes by:

new nicEditor({fullPanel : true}).panelInstance('area2');

But how do I do this when using bkLib.onDomLoaded(nicEditors.allTextAreas); ?

I'm baffled.

Thanks!

For what it's worth, We also have jquery running as well.

like image 843
stringo0 Avatar asked Oct 16 '10 00:10

stringo0


1 Answers

This is the right answer to question... This is really missing in the documentation of NicEdit. With this is possible to configure all textareas with the same custom config.

   bkLib.onDomLoaded(function() {
      nicEditors.allTextAreas({buttonList : ['bold','italic','underline']});
   }); 
like image 145
pedrofalcaocosta Avatar answered Oct 27 '22 12:10

pedrofalcaocosta