CodeIgniter Forums
nicEdit error "obj is null" - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23)
+--- Thread: nicEdit error "obj is null" (/showthread.php?tid=16710)



nicEdit error "obj is null" - El Forum - 03-14-2009

[eluser]tfncruz[/eluser]
Hi!

I'm trying to integrate nicEdit with codeigniter.
If I use
Code:
bkLib.onDomLoaded(nicEditors.allTextAreas);
everything's fine.
But, since I want to configure the buttons, if I use, for example,
Code:
new nicEditor({buttonList : ['fontSize','bold','italic','underline']} ).panelInstance('nic');
it returns the following error: "obj is null"...

Any ideas?! Sad


nicEdit error "obj is null" - El Forum - 03-14-2009

[eluser]TheFuzzy0ne[/eluser]
Where is the error displayed? It doesn't sound like a standard JavaScript error, so I'd suggest you check the JavaScript source for the library.


nicEdit error "obj is null" - El Forum - 03-15-2009

[eluser]tfncruz[/eluser]
Thank you for the feedback!

The issue is solved!
There's nothing wrong with nicEdit or codeigniter.
The code must be like this:
Code:
bkLib.onDomLoaded(function() { new nicEditor({buttonList : ['fontSize','bold','italic','underline','strikeThrough']}).panelInstance('nic'); });

Now... there's another problem... When you're filling the textarea the enter key doesn't function...!

Again, any ideas?


nicEdit error "obj is null" - El Forum - 03-15-2009

[eluser]TheFuzzy0ne[/eluser]
I can't help you there I'm afraid. I'm guessing that the key press is meant to be processed by the editor. I'd suggest either redownloading the JavaScript code, trying a different version, or asking on the [url="http://www.nicedit.com/forums/"]nicEdit forums[/url].