Gossamer Forum
Home : General : Internet Technologies :

FCKEditor - multiple TEXTAREAs on one page?

Quote Reply
FCKEditor - multiple TEXTAREAs on one page?
Hi,

I'm trying to get FCKEditor working with about 5 TEXTAREA's on a form - code is:

Code:
<script type="text/javascript" src="/static/wysiwyg/fckeditor.js"></script>
<script type="text/javascript">

window.onload = function()
{
var oFCKeditor1 = new FCKeditor( 'OtherInfo' ) ;
oFCKeditor1.BasePath = '/static/wysiwyg/';
oFCKeditor1.Width = '550';
oFCKeditor1.ToolbarSet = 'Basic' ;
oFCKeditor1.ReplaceTextarea() ;

var oFCKeditor2 = new FCKeditor( 'BodyText' ) ;
oFCKeditor2.BasePath = '/static/wysiwyg/';
oFCKeditor2.Width = '550';
oFCKeditor2.ToolbarSet = 'Basic' ;
oFCKeditor2.ReplaceTextarea() ;

var oFCKeditor3 = new FCKeditor( 'Credability' ) ;
oFCKeditor3.BasePath = '/static/wysiwyg/';
oFCKeditor3.Width = '550';
oFCKeditor3.ToolbarSet = 'Basic' ;
oFCKeditor3.ReplaceTextarea() ;

var oFCKeditor4 = new FCKeditor( 'ContactDetails2' ) ;
oFCKeditor4.BasePath = '/static/wysiwyg/';
oFCKeditor4.Width = '550';
oFCKeditor4.ToolbarSet = 'Basic' ;
oFCKeditor4.ReplaceTextarea() ;

var oFCKeditor5 = new FCKeditor( 'ContactDetails' ) ;
oFCKeditor5.BasePath = '/static/wysiwyg/';
oFCKeditor5.Width = '550';
oFCKeditor5.ToolbarSet = 'Basic' ;
oFCKeditor5.ReplaceTextarea() ;

}

The first one (OtherInfo) works fine - and loads the WYSIWYG editor - but the rest just remain as basic TEXTAREA's :/

Has anyone managed to get this to work before, and if so, any pointers? Smile

TIA

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!