var editors = new Array(); // jmena var ofckeditors = new Array(); // objekty var editorwidths = new Array(); var editorheights = new Array(); var basepath = '/js/'; function fckeditorsinit() { var width='100%', height=200; for (var i=0; i < editors.length; i++) { if (editorwidths[i] != null) width = editorwidths[i]; if (editorheights[i] != null) height = editorheights[i]; ofckeditors[i] = new FCKeditor( editors[i], width, height ); ofckeditors[i].BasePath = basepath + 'fckeditor/'; ofckeditors[i].Config["CustomConfigurationsPath"] = basepath + 'myfckconfig.js?' + (new Date()*1) ; ofckeditors[i].ReplaceTextarea(); } } registerinit(fckeditorsinit); function editorinserttext(index, src) { var oEditor = FCKeditorAPI.GetInstance(editors[index]) ; if ( oEditor.EditMode == FCK_EDITMODE_WYSIWYG ) oEditor.InsertHtml( src ) ; // else alert( 'You must be on WYSIWYG mode!' ) ; return true; }