/*
* FCKeditor - The text editor for internet
* Copyright (C) 2003-2004 Frederico Caldeira Knabben
*
* Licensed under the terms of the GNU Lesser General Public License
* (http://www.opensource.org/licenses/lgpl-license.php)
*
* For further information go to http://www.fckeditor.net/
* or contact fredck@fckeditor.net.
*
* fckeditor.js: Inserts a FCKeditor instance in a HTML page.
*
* Authors:
* Frederico Caldeira Knabben (fredck@fckeditor.net)
*/
var isOpera = (navigator.userAgent.indexOf("Opera") > 0) ;
// Check if the browser is compatible with the Editor:
// - Internet Explorer 5 or above
var isCompatible = (!isOpera && navigator.appName == 'Microsoft Internet Explorer') ;
if (isCompatible)
{
var browserVersion = navigator.appVersion.match(/MSIE (.\..)/)[1] ;
isCompatible = (browserVersion >= 5) ;
}
// FCKeditor class
function FCKeditor(instanceName, width, height, toolbarSet, value)
{
this.InstanceName = instanceName ;
this.Width = width || '100%' ;
this.Height = height || '200' ;
this.ToolbarSet = toolbarSet ;
this.Value = value || '' ;
this.Config = new Object() ;
this.CanUpload = null ; // true / false
this.CanBrowse = null ; // true / false
this.BasePath = '/FCKeditor/' ;
}
FCKeditor.prototype.Create = function()
{
if (isCompatible)
{
document.write( this._GetIFrameHtml() ) ;
document.write('') ;
}
else
{
var sWidth = this.Width.toString().indexOf('%') > 0 ? this.Width : this.Width + 'px' ;
var sHeight = this.Height.toString().indexOf('%') > 0 ? this.Height : this.Height + 'px' ;
document.write('