I'm trying to integrate FCKEditor with a little homebrew CMS app. The CMS is templated, so I'm particularly interested in the dynamic textarea replacement described in Method 2 of this page: http://fckeditor.wikiwikiweb.de/Develop ... Javascript . It works great when I have just one textarea on the page. However, I have not been able to figure out how to get this technique to work with multiple textarea fields on the same page. (The problem, of course, being that I just don't know javascript!)
The function which replaces textareas looks for a textarea with one particular name, while I now want to match against more than one possible name (or perhaps even just *all* textareas on the page). If that makes sense?
Any suggestions, pointers, etc. would be greatly apperciated!
Mon, 03/13/2006 - 17:08
#1
RE: Multiple Editors + textarea replace
var oFCKeditor = null;
oFCKeditor = new FCKeditor( 'MyTextarea' ) ;
oFCKeditor.BasePath = "/FCKeditor/" ;
oFCKeditor.ReplaceTextarea() ;
var o2FCKeditor = null;
o2FCKeditor = new FCKeditor( 'OtherTextarea' ) ;
o2FCKeditor.BasePath = "/FCKeditor/" ;
o2FCKeditor.ReplaceTextarea() ;
RE: Multiple Editors + textarea replace
"I resolved that by replicating the FCKEditor object with a different name. I also nulled both objects for each use to overcome a memory resource problem I was observing"
I'll give it another try. Thanks!
Hmm.. I had tried that originally, and only the second object worked. It sounds like I probably made a mistake somewhere then, which is an encouraging answer