' ;
-
-
- var oCell = parentToolbar.DOMRow.insertCell(-1) ;
- oCell.appendChild( this.DOMDiv ) ;
-
- this.RefreshState() ;
-}
-
-FCKToolbarButton.prototype.RefreshState = function()
-{
- // Gets the actual state.
- var eState ;
-
- if ( FCK.EditMode == FCK_EDITMODE_SOURCE && ! this.SourceView )
- eState = FCK_TRISTATE_DISABLED ;
- else
- eState = this.Command.GetState() ;
-
- // If there are no state changes than do nothing and return.
- if ( eState == this.State ) return ;
-
- // Sets the actual state.
- this.State = eState ;
-
- switch ( this.State )
- {
- case FCK_TRISTATE_ON :
- this.DOMDiv.className = 'TB_Button_On' ;
- break ;
- case FCK_TRISTATE_OFF :
- this.DOMDiv.className = 'TB_Button_Off' ;
- break ;
- default :
- this.DOMDiv.className = 'TB_Button_Disabled' ;
- break ;
- }
-}
\ No newline at end of file
diff --git a/lib/editor/_source/classes/fcktoolbarcombo.js b/lib/editor/_source/classes/fcktoolbarcombo.js
deleted file mode 100644
index 6ac6a71..0000000
--- a/lib/editor/_source/classes/fcktoolbarcombo.js
+++ /dev/null
@@ -1,150 +0,0 @@
-/*
- * 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 visit:
- * http://www.fckeditor.net/
- *
- * File Name: fcktoolbarcombo.js
- * FCKToolbarCombo Class: represents a combo in the toolbar.
- *
- * Version: 2.0 RC2
- * Modified: 2004-11-10 17:14:48
- *
- * File Authors:
- * Frederico Caldeira Knabben (fredck@fckeditor.net)
- */
-
-var FCKToolbarCombo = function( commandName, label, itemsValues, itemsNames, tooltip, style, firstIsBlank, itemsSeparator, sourceView )
-{
- this.Command = FCKCommands.GetCommand( commandName ) ;
-
- this.Label = label ? label : commandName ;
- this.Tooltip = tooltip ? tooltip : ( label ? label : commandName) ;
- this.Style = style ? style : FCK_TOOLBARITEM_ICONTEXT ;
- this.SourceView = sourceView ? true : false ;
- this.State = FCK_UNKNOWN ;
-
- this.ItemsValues = itemsValues ;
- this.ItemsNames = itemsNames ? itemsNames : itemsValues ;
- this.ItemsSeparator = itemsSeparator ? itemsSeparator : ';' ;
-
- this.FirstIsBlank = firstIsBlank != null ? firstIsBlank : true ;
-}
-
-FCKToolbarCombo.prototype.CreateInstance = function( parentToolbar )
-{
-/*
-
-
-
-
Style
-
-
-
-
-*/
- this.DOMDiv = document.createElement( 'div' ) ;
- this.DOMDiv.className = 'TB_Combo_Off' ;
-
- // Gets the correct CSS class to use for the specified style (param).
- var sClass ;
- switch ( this.Style )
- {
- case FCK_TOOLBARITEM_ONLYICON :
- sClass = 'TB_ButtonType_Icon' ;
- break ;
- case FCK_TOOLBARITEM_ONLYTEXT :
- sClass = 'TB_ButtonType_Text' ;
- break ;
- case FCK_TOOLBARITEM_ICONTEXT :
- sClass = '' ;
- break ;
- }
-
- this.DOMDiv.innerHTML =
- '
' +
- '
' +
- '
' + this.Label + '
' +
- '
' +
- '
' +
- '
' ;
-
- // Gets the SELECT element.
- this.SelectElement = this.DOMDiv.firstChild.firstChild.firstChild.childNodes.item(1).firstChild ;
-
- this.SelectElement.FCKToolbarCombo = this ;
-
- this.SelectElement.onchange = function()
- {
- this.FCKToolbarCombo.Command.Execute( this.value ) ;
- return false ;
- }
-
- var oCell = parentToolbar.DOMRow.insertCell(-1) ;
- oCell.appendChild( this.DOMDiv ) ;
-
- // Loads all combo items.
- this.RefreshItems() ;
-
- // Sets its initial state (probably disabled).
- this.RefreshState() ;
-}
-
-FCKToolbarCombo.prototype.RefreshItems = function()
-{
- // Create the empty arrays of items to add (names and values)
- var aNames = FCKTools.GetResultingArray( this.ItemsNames, this.ItemsSeparator ) ;
- var aValues = FCKTools.GetResultingArray( this.ItemsValues, this.ItemsSeparator ) ;
-
- // Clean up the combo.
- FCKTools.RemoveAllSelectOptions( this.SelectElement ) ;
-
- // Verifies if the first item in the combo must be blank.
- if ( this.FirstIsBlank )
- FCKTools.AddSelectOption( document, this.SelectElement, '', '' ) ;
-
- // Add all items to the combo.
- for ( var i = 0 ; i < aValues.length ; i++ )
- {
- FCKTools.AddSelectOption( document, this.SelectElement, aNames[i], aValues[i] ) ;
- }
-}
-
-FCKToolbarCombo.prototype.RefreshState = function()
-{
- // Gets the actual state.
- var eState ;
-
- if ( FCK.EditMode == FCK_EDITMODE_SOURCE && ! this.SourceView )
- {
- eState = FCK_TRISTATE_DISABLED ;
-
- // Cleans the actual selection.
- this.SelectElement.value = '' ;
- }
- else
- {
- var sValue = this.Command.GetState() ;
-
- // Sets the combo value.
- FCKTools.SelectNoCase( this.SelectElement, sValue ? sValue : '', '' ) ;
-
- // Gets the actual state.
- eState = sValue == null ? FCK_TRISTATE_DISABLED : FCK_TRISTATE_ON ;
- }
-
- // If there are no state changes then do nothing and return.
- if ( eState == this.State ) return ;
-
- // Sets the actual state.
- this.State = eState ;
-
- // Updates the graphical state.
- this.DOMDiv.className = ( eState == FCK_TRISTATE_ON ? 'TB_Combo_Off' : 'TB_Combo_Disabled' ) ;
- this.SelectElement.disabled = ( eState == FCK_TRISTATE_DISABLED ) ;
-}
-
diff --git a/lib/editor/_source/classes/fcktoolbarfontformatcombo.js b/lib/editor/_source/classes/fcktoolbarfontformatcombo.js
deleted file mode 100644
index 4d702ae..0000000
--- a/lib/editor/_source/classes/fcktoolbarfontformatcombo.js
+++ /dev/null
@@ -1,60 +0,0 @@
-/*
- * 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 visit:
- * http://www.fckeditor.net/
- *
- * File Name: fcktoolbarfontformatcombo.js
- * FCKToolbarPanelButton Class: Handles the Fonts combo selector.
- *
- * Version: 2.0 RC2
- * Modified: 2004-12-05 22:25:20
- *
- * File Authors:
- * Frederico Caldeira Knabben (fredck@fckeditor.net)
- */
-
-var FCKToolbarFontFormatCombo = function()
-{
- this.Command = FCKCommands.GetCommand( 'FontFormat' ) ;
-}
-
-// Inherit from FCKToolbarSpecialCombo.
-FCKToolbarFontFormatCombo.prototype = new FCKToolbarSpecialCombo ;
-
-FCKToolbarFontFormatCombo.prototype.GetLabel = function()
-{
- return FCKLang.FontFormat ;
-}
-
-FCKToolbarFontFormatCombo.prototype.CreateItems = function( targetSpecialCombo )
-{
- // Get the format names from the language file.
- var aNames = FCKLang['FontFormats'].split(';') ;
- var oNames = {
- p : aNames[0],
- pre : aNames[1],
- address : aNames[2],
- h1 : aNames[3],
- h2 : aNames[4],
- h3 : aNames[5],
- h4 : aNames[6],
- h5 : aNames[7],
- h6 : aNames[8],
- div : aNames[9]
- } ;
-
- // Get the available formats from the configuration file.
- var aTags = FCKConfig.FontFormats.split(';') ;
-
- for ( var i = 0 ; i < aTags.length ; i++ )
- {
- if ( aTags[i] == 'div' && FCKBrowserInfo.IsGecko )
- continue ;
- this._Combo.AddItem( aTags[i], '<' + aTags[i] + '>' + oNames[aTags[i]] + '' + aTags[i] + '>', oNames[aTags[i]] ) ;
- }
-}
\ No newline at end of file
diff --git a/lib/editor/_source/classes/fcktoolbarfontscombo.js b/lib/editor/_source/classes/fcktoolbarfontscombo.js
deleted file mode 100644
index 153ca50..0000000
--- a/lib/editor/_source/classes/fcktoolbarfontscombo.js
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- * 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 visit:
- * http://www.fckeditor.net/
- *
- * File Name: fcktoolbarfontscombo.js
- * FCKToolbarPanelButton Class: Handles the Fonts combo selector.
- *
- * Version: 2.0 RC2
- * Modified: 2004-11-19 07:50:38
- *
- * File Authors:
- * Frederico Caldeira Knabben (fredck@fckeditor.net)
- */
-
-var FCKToolbarFontsCombo = function()
-{
- this.Command = FCKCommands.GetCommand( 'FontName' ) ;
-}
-
-// Inherit from FCKToolbarSpecialCombo.
-FCKToolbarFontsCombo.prototype = new FCKToolbarSpecialCombo ;
-
-FCKToolbarFontsCombo.prototype.GetLabel = function()
-{
- return FCKLang.Font ;
-}
-
-FCKToolbarFontsCombo.prototype.CreateItems = function( targetSpecialCombo )
-{
- var aFonts = FCKConfig.FontNames.split(';') ;
-
- for ( var i = 0 ; i < aFonts.length ; i++ )
- this._Combo.AddItem( aFonts[i], '' + aFonts[i] + '' ) ;
-}
\ No newline at end of file
diff --git a/lib/editor/_source/classes/fcktoolbarfontsizecombo.js b/lib/editor/_source/classes/fcktoolbarfontsizecombo.js
deleted file mode 100644
index 00bd2eb..0000000
--- a/lib/editor/_source/classes/fcktoolbarfontsizecombo.js
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- * 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 visit:
- * http://www.fckeditor.net/
- *
- * File Name: fcktoolbarfontsizecombo.js
- * FCKToolbarPanelButton Class: Handles the Fonts combo selector.
- *
- * Version: 2.0 RC2
- * Modified: 2004-11-19 07:50:29
- *
- * File Authors:
- * Frederico Caldeira Knabben (fredck@fckeditor.net)
- */
-
-var FCKToolbarFontSizeCombo = function()
-{
- this.Command = FCKCommands.GetCommand( 'FontSize' ) ;
-}
-
-// Inherit from FCKToolbarSpecialCombo.
-FCKToolbarFontSizeCombo.prototype = new FCKToolbarSpecialCombo ;
-
-FCKToolbarFontSizeCombo.prototype.GetLabel = function()
-{
- return FCKLang.FontSize ;
-}
-
-FCKToolbarFontSizeCombo.prototype.CreateItems = function( targetSpecialCombo )
-{
- targetSpecialCombo.FieldWidth = 70 ;
-
- var aSizes = FCKConfig.FontSizes.split(';') ;
-
- for ( var i = 0 ; i < aSizes.length ; i++ )
- {
- var aSizeParts = aSizes[i].split('/') ;
- this._Combo.AddItem( aSizeParts[0], '' + aSizeParts[1] + '', aSizeParts[1] ) ;
- }
-}
\ No newline at end of file
diff --git a/lib/editor/_source/classes/fcktoolbarpanelbutton.js b/lib/editor/_source/classes/fcktoolbarpanelbutton.js
deleted file mode 100644
index c0c16c7..0000000
--- a/lib/editor/_source/classes/fcktoolbarpanelbutton.js
+++ /dev/null
@@ -1,117 +0,0 @@
-/*
- * 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 visit:
- * http://www.fckeditor.net/
- *
- * File Name: fcktoolbarpanelbutton.js
- * FCKToolbarPanelButton Class: represents a special button in the toolbar
- * that shows a panel when pressed.
- *
- * Version: 2.0 RC2
- * Modified: 2004-11-30 09:26:22
- *
- * File Authors:
- * Frederico Caldeira Knabben (fredck@fckeditor.net)
- */
-
-var FCKToolbarPanelButton = function( commandName, label, tooltip, style )
-{
- this.Command = FCKCommands.GetCommand( commandName ) ;
- this.Label = label ? label : commandName ;
- this.Tooltip = tooltip ? tooltip : ( label ? label : commandName) ;
- this.Style = style ? style : FCK_TOOLBARITEM_ONLYICON ;
- this.State = FCK_UNKNOWN ;
-}
-
-FCKToolbarPanelButton.prototype.CreateInstance = function( parentToolbar )
-{
-/*
-
-
-
-
-
Redo
-
-
-
-
-*/
- this.DOMDiv = document.createElement( 'div' ) ;
- this.DOMDiv.className = 'TB_Button_Off' ;
-
- this.DOMDiv.FCKToolbarButton = this ;
-
- this.DOMDiv.onmouseover = function()
- {
- if ( this.FCKToolbarButton.State != FCK_TRISTATE_DISABLED )
- {
- this.className = 'TB_Button_On' ;
- }
- }
-
- this.DOMDiv.onmouseout = function()
- {
- if ( this.FCKToolbarButton.State != FCK_TRISTATE_DISABLED && this.FCKToolbarButton.State != FCK_TRISTATE_ON )
- {
- this.className = 'TB_Button_Off' ;
- }
- }
-
- this.DOMDiv.onclick = function( e )
- {
- // For Mozilla we must stop the event propagation to avoid it hiding
- // the panel because of a click outside of it.
- if ( e )
- {
- e.stopPropagation() ;
- FCKPanelEventHandlers.OnDocumentClick( e ) ;
- }
-
- if ( this.FCKToolbarButton.State != FCK_TRISTATE_DISABLED )
- {
- this.FCKToolbarButton.Command.Execute(0, this.FCKToolbarButton.DOMDiv.offsetHeight, this.FCKToolbarButton.DOMDiv) ;
-// this.FCKToolbarButton.HandleOnClick( this.FCKToolbarButton, e ) ;
- }
-
- return false ;
- }
-
- // Gets the correct CSS class to use for the specified style (param).
- var sClass ;
- switch ( this.Style )
- {
- case FCK_TOOLBARITEM_ONLYICON :
- sClass = 'TB_ButtonType_Icon' ;
- break ;
- case FCK_TOOLBARITEM_ONLYTEXT :
- sClass = 'TB_ButtonType_Text' ;
- break ;
- case FCK_TOOLBARITEM_ICONTEXT :
- sClass = '' ;
- break ;
- }
-
- this.DOMDiv.innerHTML =
- '
' +
- '
' +
- '
' +
- '
' + this.Label + '
' +
- '
' +
- '
' +
- '
' ;
-
-
- var oCell = parentToolbar.DOMRow.insertCell(-1) ;
- oCell.appendChild( this.DOMDiv ) ;
-
- this.RefreshState() ;
-}
-
-// The Panel Button works like a normal button so the refresh state function
-// defined for the normal button can be reused here.
-FCKToolbarPanelButton.prototype.RefreshState = FCKToolbarButton.prototype.RefreshState ;
\ No newline at end of file
diff --git a/lib/editor/_source/classes/fcktoolbarspecialcombo.js b/lib/editor/_source/classes/fcktoolbarspecialcombo.js
deleted file mode 100644
index 0ecb7ba..0000000
--- a/lib/editor/_source/classes/fcktoolbarspecialcombo.js
+++ /dev/null
@@ -1,92 +0,0 @@
-/*
- * 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 visit:
- * http://www.fckeditor.net/
- *
- * File Name: fcktoolbarspecialcombo.js
- * FCKToolbarSpecialCombo Class: This is a "abstract" base class to be used
- * by the special combo toolbar elements like font name, font size, paragraph format, etc...
- *
- * The following properties and methods must be implemented when inheriting from
- * this class:
- * - Property: Command [ The command to be executed ]
- * - Method: GetLabel() [ Returns the label ]
- * - CreateItems( targetSpecialCombo ) [ Add all items in the special combo ]
- *
- * Version: 2.0 RC2
- * Modified: 2004-11-15 10:53:54
- *
- * File Authors:
- * Frederico Caldeira Knabben (fredck@fckeditor.net)
- */
-
-var FCKToolbarSpecialCombo = function()
-{}
-
-FCKToolbarSpecialCombo.prototype.CreateInstance = function( parentToolbar )
-{
- this._Combo = new FCKSpecialCombo( this.GetLabel() ) ;
- this._Combo.FieldWidth = 100 ;
- this._Combo.PanelWidth = 150 ;
- this._Combo.PanelMaxHeight = 150 ;
-
- this.CreateItems( this._Combo ) ;
-
- this._Combo.Create( parentToolbar.DOMRow.insertCell(-1) ) ;
-
- this._Combo.Command = this.Command ;
-
- this._Combo.OnSelect = function( itemId, item )
- {
- this.Command.Execute( itemId, item ) ;
- }
-}
-
-FCKToolbarSpecialCombo.prototype.RefreshState = function()
-{
- // Gets the actual state.
- var eState ;
-
- if ( FCK.EditMode == FCK_EDITMODE_SOURCE && ! this.SourceView )
- eState = FCK_TRISTATE_DISABLED ;
- else
- {
- var sValue = this.Command.GetState() ;
-
- if ( sValue != FCK_TRISTATE_DISABLED )
- {
- eState = FCK_TRISTATE_ON ;
-
- if ( typeof( this.RefreshActiveItems ) == 'function' )
- this.RefreshActiveItems( this._Combo ) ;
- else
- {
- this._Combo.DeselectAll() ;
- this._Combo.SelectItem( sValue ) ;
- this._Combo.SetLabelById( sValue ) ;
- }
- }
- else
- eState = FCK_TRISTATE_DISABLED ;
- }
-
- // If there are no state changes then do nothing and return.
- if ( eState == this.State ) return ;
-
- if ( eState == FCK_TRISTATE_DISABLED )
- {
- this._Combo.DeselectAll() ;
- this._Combo.SetLabel( '' ) ;
- }
-
- // Sets the actual state.
- this.State = eState ;
-
- // Updates the graphical state.
- this._Combo.SetEnabled( eState != FCK_TRISTATE_DISABLED ) ;
-}
\ No newline at end of file
diff --git a/lib/editor/_source/classes/fcktoolbarstylecombo.js b/lib/editor/_source/classes/fcktoolbarstylecombo.js
deleted file mode 100644
index e395d62..0000000
--- a/lib/editor/_source/classes/fcktoolbarstylecombo.js
+++ /dev/null
@@ -1,89 +0,0 @@
-/*
- * 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 visit:
- * http://www.fckeditor.net/
- *
- * File Name: fcktoolbarstylecombo.js
- * FCKToolbarPanelButton Class: Handles the Fonts combo selector.
- *
- * Version: 2.0 RC2
- * Modified: 2004-11-19 07:50:11
- *
- * File Authors:
- * Frederico Caldeira Knabben (fredck@fckeditor.net)
- */
-
-var FCKToolbarStyleCombo = function()
-{
- this.Command = FCKCommands.GetCommand( 'Style' ) ;
-}
-
-// Inherit from FCKToolbarSpecialCombo.
-FCKToolbarStyleCombo.prototype = new FCKToolbarSpecialCombo ;
-
-FCKToolbarStyleCombo.prototype.GetLabel = function()
-{
- return FCKLang.Style ;
-}
-
-FCKToolbarStyleCombo.prototype.CreateItems = function( targetSpecialCombo )
-{
- // Add the Editor Area CSS to the Styles panel so the style classes are previewed correctly.
- FCKTools.AppendStyleSheet( targetSpecialCombo._Panel.Document, FCKConfig.EditorAreaCSS ) ;
-
- // For some reason Gecko is blocking inside the "RefreshVisibleItems" function.
- if ( ! FCKBrowserInfo.IsGecko )
- targetSpecialCombo.OnBeforeClick = this.RefreshVisibleItems ;
-
- // Add the styles to the special combo.
- for ( var s in this.Command.Styles )
- {
- var oStyle = this.Command.Styles[s] ;
- if ( oStyle.IsObjectElement )
- var oItem = targetSpecialCombo.AddItem( s, s ) ;
- else
- var oItem = targetSpecialCombo.AddItem( s, oStyle.GetOpenerTag() + s + oStyle.GetCloserTag() ) ;
- oItem.Style = oStyle ;
- }
-}
-
-FCKToolbarStyleCombo.prototype.RefreshActiveItems = function( targetSpecialCombo )
-{
- // Clear the actual selection.
- targetSpecialCombo.DeselectAll() ;
-
- // Get the active styles.
- var aStyles = this.Command.GetActiveStyles() ;
-
- if ( aStyles.length > 0 )
- {
- // Select the active styles in the combo.
- for ( var i = 0 ; i < aStyles.length ; i++ )
- targetSpecialCombo.SelectItem( aStyles[i].Name ) ;
-
- // Set the combo label to the first style in the collection.
- targetSpecialCombo.SetLabelById( aStyles[0].Name ) ;
- }
- else
- targetSpecialCombo.SetLabel('') ;
-}
-
-FCKToolbarStyleCombo.prototype.RefreshVisibleItems = function( targetSpecialCombo )
-{
- if ( FCKSelection.GetType() == 'Control' )
- var sTagName = FCKSelection.GetSelectedElement().tagName ;
-
- for ( var i in targetSpecialCombo.Items )
- {
- var oItem = targetSpecialCombo.Items[i] ;
- if ( ( sTagName && oItem.Style.Element == sTagName ) || ( ! sTagName && ! oItem.Style.IsObjectElement ) )
- oItem.style.display = '' ;
- else
- oItem.style.display = 'none' ; // For some reason Gecko is blocking here.
- }
-}
\ No newline at end of file
diff --git a/lib/editor/_source/classes/fckxml.js b/lib/editor/_source/classes/fckxml.js
deleted file mode 100644
index c388be9..0000000
--- a/lib/editor/_source/classes/fckxml.js
+++ /dev/null
@@ -1,109 +0,0 @@
-/*
- * 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 visit:
- * http://www.fckeditor.net/
- *
- * File Name: fckxml.js
- * FCKXml Class: class to load and manipulate XML files.
- *
- * Version: 2.0 RC2
- * Modified: 2004-11-22 11:13:07
- *
- * File Authors:
- * Frederico Caldeira Knabben (fredck@fckeditor.net)
- */
-
-var FCKXml = function()
-{}
-
-FCKXml.prototype.GetHttpRequest = function()
-{
- if ( window.XMLHttpRequest ) // Gecko
- return new XMLHttpRequest() ;
- else if ( window.ActiveXObject ) // IE
- return new ActiveXObject("MsXml2.XmlHttp") ;
-}
-
-FCKXml.prototype.LoadUrl = function( urlToCall, asyncFunctionPointer )
-{
- var oFCKXml = this ;
-
- var bAsync = ( typeof(asyncFunctionPointer) == 'function' ) ;
-
- var oXmlHttp = this.GetHttpRequest() ;
-
- oXmlHttp.open( "GET", urlToCall, bAsync ) ;
-
- if ( bAsync )
- {
- oXmlHttp.onreadystatechange = function()
- {
- if ( oXmlHttp.readyState == 4 )
- {
- oFCKXml.DOMDocument = oXmlHttp.responseXML ;
- asyncFunctionPointer( oFCKXml ) ;
- }
- }
- }
-
- oXmlHttp.send( null ) ;
-
- if ( ! bAsync && oXmlHttp.status && oXmlHttp.status == 200 )
- this.DOMDocument = oXmlHttp.responseXML ;
- else
- throw( 'Error loading "' + urlToCall + '"' ) ;
-}
-
-FCKXml.prototype.SelectNodes = function( xpath, contextNode )
-{
- if ( document.all ) // IE
- {
- if ( contextNode )
- return contextNode.selectNodes( xpath ) ;
- else
- return this.DOMDocument.selectNodes( xpath ) ;
- }
- else // Gecko
- {
- var aNodeArray = new Array();
-
- var xPathResult = this.DOMDocument.evaluate( xpath, contextNode ? contextNode : this.DOMDocument,
- this.DOMDocument.createNSResolver(this.DOMDocument.documentElement), XPathResult.ORDERED_NODE_ITERATOR_TYPE, null) ;
- if ( xPathResult )
- {
- var oNode = xPathResult.iterateNext() ;
- while( oNode )
- {
- aNodeArray[aNodeArray.length] = oNode ;
- oNode = xPathResult.iterateNext();
- }
- }
- return aNodeArray ;
- }
-}
-
-FCKXml.prototype.SelectSingleNode = function( xpath, contextNode )
-{
- if ( document.all ) // IE
- {
- if ( contextNode )
- return contextNode.selectSingleNode( xpath ) ;
- else
- return this.DOMDocument.selectSingleNode( xpath ) ;
- }
- else // Gecko
- {
- var xPathResult = this.DOMDocument.evaluate( xpath, contextNode ? contextNode : this.DOMDocument,
- this.DOMDocument.createNSResolver(this.DOMDocument.documentElement), 9, null);
-
- if ( xPathResult && xPathResult.singleNodeValue )
- return xPathResult.singleNodeValue ;
- else
- return null ;
- }
-}
diff --git a/lib/editor/_source/commandclasses/fck_othercommands.js b/lib/editor/_source/commandclasses/fck_othercommands.js
deleted file mode 100644
index 85d1728..0000000
--- a/lib/editor/_source/commandclasses/fck_othercommands.js
+++ /dev/null
@@ -1,194 +0,0 @@
-/*
- * 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 visit:
- * http://www.fckeditor.net/
- *
- * File Name: fck_othercommands.js
- * Definition of other commands that are not available internaly in the
- * browser (see FCKNamedCommand).
- *
- * Version: 2.0 RC2
- * Modified: 2004-12-15 13:28:09
- *
- * File Authors:
- * Frederico Caldeira Knabben (fredck@fckeditor.net)
- */
-
-// ### General Dialog Box Commands.
-var FCKDialogCommand = function( name, title, url, width, height, getStateFunction, getStateParam )
-{
- this.Name = name ;
- this.Title = title ;
- this.Url = url ;
- this.Width = width ;
- this.Height = height ;
-
- this.GetStateFunction = getStateFunction ;
- this.GetStateParam = getStateParam ;
-}
-
-FCKDialogCommand.prototype.Execute = function()
-{
- FCKDialog.OpenDialog( 'FCKDialog_' + this.Name , this.Title, this.Url, this.Width, this.Height ) ;
-}
-
-FCKDialogCommand.prototype.GetState = function()
-{
- if ( this.GetStateFunction )
- return this.GetStateFunction( this.GetStateParam ) ;
- else
- return FCK_TRISTATE_OFF ;
-}
-
-// Generic Undefined command (usually used when a command is under development).
-var FCKUndefinedCommand = function()
-{
- this.Name = 'Undefined' ;
-}
-
-FCKUndefinedCommand.prototype.Execute = function()
-{
- alert( FCKLang.NotImplemented ) ;
-}
-
-FCKUndefinedCommand.prototype.GetState = function()
-{
- return FCK_TRISTATE_OFF ;
-}
-
-// ### FontName
-var FCKFontNameCommand = function()
-{
- this.Name = 'FontName' ;
-}
-
-FCKFontNameCommand.prototype.Execute = function( fontName )
-{
- if (fontName == null || fontName == "")
- {
- // TODO: Remove font name attribute.
- }
- else
- FCK.ExecuteNamedCommand( 'FontName', fontName ) ;
-}
-
-FCKFontNameCommand.prototype.GetState = function()
-{
- return FCK.GetNamedCommandValue( 'FontName' ) ;
-}
-
-// ### FontSize
-var FCKFontSizeCommand = function()
-{
- this.Name = 'FontSize' ;
-}
-
-FCKFontSizeCommand.prototype.Execute = function( fontSize )
-{
- if ( typeof( fontSize ) == 'string' ) fontSize = parseInt(fontSize) ;
-
- if ( fontSize == null || fontSize == '' )
- {
- // TODO: Remove font size attribute (Now it works with size 3. Will it work forever?)
- FCK.ExecuteNamedCommand( 'FontSize', 3 ) ;
- }
- else
- FCK.ExecuteNamedCommand( 'FontSize', fontSize ) ;
-}
-
-FCKFontSizeCommand.prototype.GetState = function()
-{
- return FCK.GetNamedCommandValue( 'FontSize' ) ;
-}
-
-// ### FormatBlock
-var FCKFormatBlockCommand = function()
-{
- this.Name = 'FormatBlock' ;
-}
-
-FCKFormatBlockCommand.prototype.Execute = function( formatName )
-{
- if ( formatName == null || formatName == '' )
- FCK.ExecuteNamedCommand( 'FormatBlock', '
' ) ;
- else
- FCK.ExecuteNamedCommand( 'FormatBlock', '<' + formatName + '>' ) ;
-}
-
-FCKFormatBlockCommand.prototype.GetState = function()
-{
- return FCK.GetNamedCommandValue( 'FormatBlock' ) ;
-}
-
-// ### Preview
-var FCKPreviewCommand = function()
-{
- this.Name = 'Preview' ;
-}
-
-FCKPreviewCommand.prototype.Execute = function()
-{
- FCK.Preview() ;
-}
-
-FCKPreviewCommand.prototype.GetState = function()
-{
- return FCK_TRISTATE_OFF ;
-}
-
-// ### Save
-var FCKSaveCommand = function()
-{
- this.Name = 'Save' ;
-}
-
-FCKSaveCommand.prototype.Execute = function()
-{
- // Get the linked field form.
- var oForm = FCK.LinkedField.form ;
-
- // Submit the form.
- oForm.submit() ;
-}
-
-FCKSaveCommand.prototype.GetState = function()
-{
- return FCK_TRISTATE_OFF ;
-}
-
-// ### NewPage
-var FCKNewPageCommand = function()
-{
- this.Name = 'NewPage' ;
-}
-
-FCKNewPageCommand.prototype.Execute = function()
-{
- FCK.SetHTML( FCKBrowserInfo.IsGecko ? ' ' : '' ) ;
-}
-
-FCKNewPageCommand.prototype.GetState = function()
-{
- return FCK_TRISTATE_OFF ;
-}
-
-// ### Source button
-var FCKSourceCommand = function()
-{
- this.Name = "Source" ;
-}
-
-FCKSourceCommand.prototype.Execute = function()
-{
- FCK.SwitchEditMode() ;
-}
-
-FCKSourceCommand.prototype.GetState = function()
-{
- return ( FCK.EditMode == FCK_EDITMODE_WYSIWYG ? FCK_TRISTATE_OFF : FCK_TRISTATE_ON ) ;
-}
\ No newline at end of file
diff --git a/lib/editor/_source/commandclasses/fcknamedcommand.js b/lib/editor/_source/commandclasses/fcknamedcommand.js
deleted file mode 100644
index 3a65828..0000000
--- a/lib/editor/_source/commandclasses/fcknamedcommand.js
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- * 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 visit:
- * http://www.fckeditor.net/
- *
- * File Name: fcknamedcommand.js
- * FCKNamedCommand Class: represents an internal browser command.
- *
- * Version: 2.0 RC2
- * Modified: 2004-08-17 15:05:35
- *
- * File Authors:
- * Frederico Caldeira Knabben (fredck@fckeditor.net)
- */
-
-var FCKNamedCommand = function( commandName )
-{
- this.Name = commandName ;
-}
-
-FCKNamedCommand.prototype.Execute = function()
-{
- FCK.ExecuteNamedCommand( this.Name ) ;
-}
-
-FCKNamedCommand.prototype.GetState = function()
-{
- return FCK.GetNamedCommandState( this.Name ) ;
-}
-
diff --git a/lib/editor/_source/commandclasses/fckpasteplaintextcommand.js b/lib/editor/_source/commandclasses/fckpasteplaintextcommand.js
deleted file mode 100644
index b34e51a..0000000
--- a/lib/editor/_source/commandclasses/fckpasteplaintextcommand.js
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- * 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 visit:
- * http://www.fckeditor.net/
- *
- * File Name: fckpasteplaintextcommand.js
- * FCKPastePlainTextCommand Class: represents the
- * "Paste as Plain Text" command.
- *
- * Version: 2.0 RC2
- * Modified: 2004-08-20 23:08:23
- *
- * File Authors:
- * Frederico Caldeira Knabben (fredck@fckeditor.net)
- */
-
-var FCKPastePlainTextCommand = function()
-{
- this.Name = 'PasteText' ;
-}
-
-FCKPastePlainTextCommand.prototype.Execute = function()
-{
- FCK.PasteAsPlainText() ;
-}
-
-FCKPastePlainTextCommand.prototype.GetState = function()
-{
- return FCK.GetNamedCommandState( 'Paste' ) ;
-}
diff --git a/lib/editor/_source/commandclasses/fckpastewordcommand.js b/lib/editor/_source/commandclasses/fckpastewordcommand.js
deleted file mode 100644
index 831022b..0000000
--- a/lib/editor/_source/commandclasses/fckpastewordcommand.js
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * 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 visit:
- * http://www.fckeditor.net/
- *
- * File Name: fckpastewordcommand.js
- * FCKPasteWordCommand Class: represents the "Paste from Word" command.
- *
- * Version: 2.0 RC2
- * Modified: 2004-08-30 23:20:46
- *
- * File Authors:
- * Frederico Caldeira Knabben (fredck@fckeditor.net)
- */
-
-var FCKPasteWordCommand = function()
-{
- this.Name = 'PasteWord' ;
-}
-
-FCKPasteWordCommand.prototype.Execute = function()
-{
- FCK.PasteFromWord() ;
-}
-
-FCKPasteWordCommand.prototype.GetState = function()
-{
- return FCK.GetNamedCommandState( 'Paste' ) ;
-}
diff --git a/lib/editor/_source/commandclasses/fckstylecommand.js b/lib/editor/_source/commandclasses/fckstylecommand.js
deleted file mode 100644
index 368c035..0000000
--- a/lib/editor/_source/commandclasses/fckstylecommand.js
+++ /dev/null
@@ -1,91 +0,0 @@
-/*
- * 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 visit:
- * http://www.fckeditor.net/
- *
- * File Name: fckstylecommand.js
- * FCKStyleCommand Class: represents the "Style" command.
- *
- * Version: 2.0 RC2
- * Modified: 2004-11-22 11:07:24
- *
- * File Authors:
- * Frederico Caldeira Knabben (fredck@fckeditor.net)
- */
-
-var FCKStyleCommand = function()
-{
- this.Name = 'Style' ;
-
- // Load the Styles defined in the XML file.
- this.StylesLoader = new FCKStylesLoader() ;
- this.StylesLoader.Load( FCKConfig.StylesXmlPath ) ;
- this.Styles = this.StylesLoader.Styles ;
-}
-
-FCKStyleCommand.prototype.Execute = function( styleName, styleComboItem )
-{
- if ( styleComboItem.Selected )
- styleComboItem.Style.RemoveFromSelection() ;
- else
- styleComboItem.Style.ApplyToSelection() ;
-
- FCK.Focus() ;
-
- FCK.Events.FireEvent( "OnSelectionChange" ) ;
-}
-
-FCKStyleCommand.prototype.GetState = function()
-{
- var oSelection = FCK.EditorDocument.selection ;
-
- if ( FCKSelection.GetType() == 'Control' )
- {
- var e = FCKSelection.GetSelectedElement() ;
- if ( e )
- return this.StylesLoader.StyleGroups[ e.tagName ] ? FCK_TRISTATE_OFF : FCK_TRISTATE_DISABLED ;
- else
- FCK_TRISTATE_OFF ;
- }
- else
- return FCK_TRISTATE_OFF ;
-}
-
-FCKStyleCommand.prototype.GetActiveStyles = function()
-{
- var aActiveStyles = new Array() ;
-
- if ( FCKSelection.GetType() == 'Control' )
- this._CheckStyle( FCKSelection.GetSelectedElement(), aActiveStyles, false ) ;
- else
- this._CheckStyle( FCKSelection.GetParentElement(), aActiveStyles, true ) ;
-
- return aActiveStyles ;
-}
-
-FCKStyleCommand.prototype._CheckStyle = function( element, targetArray, checkParent )
-{
- if ( ! element )
- return ;
-
- if ( element.nodeType == 1 )
- {
- var aStyleGroup = this.StylesLoader.StyleGroups[ element.tagName ] ;
- if ( aStyleGroup )
- {
- for ( var i = 0 ; i < aStyleGroup.length ; i++ )
- {
- if ( aStyleGroup[i].IsEqual( element ) )
- targetArray[ targetArray.length ] = aStyleGroup[i] ;
- }
- }
- }
-
- if ( checkParent )
- this._CheckStyle( element.parentNode, targetArray, checkParent ) ;
-}
\ No newline at end of file
diff --git a/lib/editor/_source/commandclasses/fcktablecommand.js b/lib/editor/_source/commandclasses/fcktablecommand.js
deleted file mode 100644
index 4b4b88d..0000000
--- a/lib/editor/_source/commandclasses/fcktablecommand.js
+++ /dev/null
@@ -1,63 +0,0 @@
-/*
- * 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 visit:
- * http://www.fckeditor.net/
- *
- * File Name: fcktablecommand.js
- * FCKPastePlainTextCommand Class: represents the
- * "Paste as Plain Text" command.
- *
- * Version: 2.0 RC2
- * Modified: 2004-11-22 15:41:58
- *
- * File Authors:
- * Frederico Caldeira Knabben (fredck@fckeditor.net)
- */
-
-var FCKTableCommand = function( command )
-{
- this.Name = command ;
-}
-
-FCKTableCommand.prototype.Execute = function()
-{
- switch ( this.Name )
- {
- case 'TableInsertRow' :
- FCKTableHandler.InsertRow() ;
- break ;
- case 'TableDeleteRows' :
- FCKTableHandler.DeleteRows() ;
- break ;
- case 'TableInsertColumn' :
- FCKTableHandler.InsertColumn() ;
- break ;
- case 'TableDeleteColumns' :
- FCKTableHandler.DeleteColumns() ;
- break ;
- case 'TableInsertCell' :
- FCKTableHandler.InsertCell() ;
- break ;
- case 'TableDeleteCells' :
- FCKTableHandler.DeleteCells() ;
- break ;
- case 'TableMergeCells' :
- FCKTableHandler.MergeCells() ;
- break ;
- case 'TableSplitCell' :
- FCKTableHandler.SplitCell() ;
- break ;
- default :
- alert( FCKLang.UnknownCommand.replace( /%1/g, this.Name ) ) ;
- }
-}
-
-FCKTableCommand.prototype.GetState = function()
-{
- return FCK_TRISTATE_OFF ;
-}
\ No newline at end of file
diff --git a/lib/editor/_source/commandclasses/fcktextcolorcommand.js b/lib/editor/_source/commandclasses/fcktextcolorcommand.js
deleted file mode 100644
index 2233522..0000000
--- a/lib/editor/_source/commandclasses/fcktextcolorcommand.js
+++ /dev/null
@@ -1,168 +0,0 @@
-/*
- * 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 visit:
- * http://www.fckeditor.net/
- *
- * File Name: fcktextcolorcommand.js
- * FCKTextColorCommand Class: represents the text color comand. It shows the
- * color selection panel.
- *
- * Version: 2.0 RC2
- * Modified: 2004-11-19 08:16:00
- *
- * File Authors:
- * Frederico Caldeira Knabben (fredck@fckeditor.net)
- */
-
-// FCKTextColorCommand Contructor
-// type: can be 'ForeColor' or 'BackColor'.
-var FCKTextColorCommand = function( type )
-{
- this.Name = type == 'ForeColor' ? 'TextColor' : 'BGColor' ;
- this.Type = type ;
-
- /* BEGIN ###
- The panel should be created in the "Execute" method for best
- memory use, but it not works in Gecko in that way.
- */
-
- this._Panel = new FCKPanel() ;
- this._Panel.StyleSheet = FCKConfig.SkinPath + 'fck_contextmenu.css' ;
- this._Panel.Create() ;
-
- this._CreatePanelBody( this._Panel.Document, this._Panel.PanelDiv ) ;
-
- // END ###
-}
-
-FCKTextColorCommand.prototype.Execute = function( panelX, panelY, relElement )
-{
- /*
- BEGIN ###
- This is the right code to create the panel, but it is not
- working well with Gecko, so it has been moved to the
- class contructor.
-
- // Create the Color Panel if needed.
- if ( ! this._Panel )
- {
- this._Panel = new FCKPanel() ;
- this._Panel.StyleSheet = FCKConfig.SkinPath + 'fck_contextmenu.css' ;
- this._Panel.Create() ;
-
- this._CreatePanelBody( this._Panel.Document, this._Panel.PanelDiv ) ;
- }
- END ###
- */
-
- // We must "cache" the actual panel type to be used in the SetColor method.
- FCK._ActiveColorPanelType = this.Type ;
-
- // Show the Color Panel at the desired position.
- this._Panel.Show( panelX, panelY, relElement ) ;
-}
-
-FCKTextColorCommand.prototype.SetColor = function( color )
-{
- if ( FCK._ActiveColorPanelType == 'ForeColor' )
- FCK.ExecuteNamedCommand( 'ForeColor', color ) ;
- else if ( FCKBrowserInfo.IsGecko )
- FCK.ExecuteNamedCommand( 'hilitecolor', color ) ;
- else
- FCK.ExecuteNamedCommand( 'BackColor', color ) ;
-
- // Delete the "cached" active panel type.
- delete FCK._ActiveColorPanelType ;
-}
-
-FCKTextColorCommand.prototype.GetState = function()
-{
- return FCK_TRISTATE_OFF ;
-}
-
-FCKTextColorCommand.prototype._CreatePanelBody = function( targetDocument, targetDiv )
-{
- function CreateSelectionDiv()
- {
- var oDiv = targetDocument.createElement( "DIV" ) ;
- oDiv.className = 'ColorDeselected' ;
- oDiv.onmouseover = function() { this.className='ColorSelected' ; } ;
- oDiv.onmouseout = function() { this.className='ColorDeselected' ; } ;
-
- return oDiv ;
- }
-
- // Create the Table that will hold all colors.
- var oTable = targetDiv.appendChild( targetDocument.createElement( "TABLE" ) ) ;
- oTable.style.tableLayout = 'fixed' ;
- oTable.cellPadding = 0 ;
- oTable.cellSpacing = 0 ;
- oTable.border = 0 ;
- oTable.width = 150 ;
-
- var oCell = oTable.insertRow(-1).insertCell(-1) ;
- oCell.colSpan = 8 ;
-
- // Create the Button for the "Automatic" color selection.
- var oDiv = oCell.appendChild( CreateSelectionDiv() ) ;
- oDiv.innerHTML =
- '
\
-
\
-
\
-
' + FCKLang.ColorAutomatic + '
\
-
\
-
' ;
-
- oDiv.Command = this ;
- oDiv.onclick = function()
- {
- this.className = 'ColorDeselected' ;
- this.Command.SetColor( '' ) ;
- this.Command._Panel.Hide() ;
- }
-
- // Create an array of colors based on the configuration file.
- var aColors = FCKConfig.FontColors.split(',') ;
-
- // Create the colors table based on the array.
- var iCounter = 0 ;
- while ( iCounter < aColors.length )
- {
- var oRow = oTable.insertRow(-1) ;
-
- for ( var i = 0 ; i < 8 && iCounter < aColors.length ; i++, iCounter++ )
- {
- var oDiv = oRow.insertCell(-1).appendChild( CreateSelectionDiv() ) ;
- oDiv.Color = aColors[iCounter] ;
- oDiv.innerHTML = '
' ;
-
- oDiv.Command = this ;
- oDiv.onclick = function()
- {
- this.className = 'ColorDeselected' ;
- this.Command.SetColor( '#' + this.Color ) ;
- this.Command._Panel.Hide() ;
- }
- }
- }
-
- // Create the Row and the Cell for the "More Colors..." button.
- var oCell = oTable.insertRow(-1).insertCell(-1) ;
- oCell.colSpan = 8 ;
-
- var oDiv = oCell.appendChild( CreateSelectionDiv() ) ;
- oDiv.innerHTML = '
' + FCKLang.ColorMoreColors + '
' ;
-
- oDiv.Command = this ;
- oDiv.onclick = function()
- {
- this.className = 'ColorDeselected' ;
- this.Command._Panel.Hide() ;
- FCKDialog.OpenDialog( 'FCKDialog_Color', FCKLang.DlgColorTitle, 'dialog/fck_colorselector.html', 400, 330, this.Command.SetColor ) ;
- }
-}
\ No newline at end of file
diff --git a/lib/editor/_source/globals/fck_constants.js b/lib/editor/_source/globals/fck_constants.js
deleted file mode 100644
index b1e7c64..0000000
--- a/lib/editor/_source/globals/fck_constants.js
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- * 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 visit:
- * http://www.fckeditor.net/
- *
- * File Name: fck_constants.js
- * Defines some constants used by the editor. These constants are also
- * globally available in the page where the editor is placed.
- *
- * Version: 2.0 RC2
- * Modified: 2004-05-31 23:07:48
- *
- * File Authors:
- * Frederico Caldeira Knabben (fredck@fckeditor.net)
- */
-
-// Editor Instance Status.
-FCK_STATUS_NOTLOADED = window.parent.FCK_STATUS_NOTLOADED = 0 ;
-FCK_STATUS_ACTIVE = window.parent.FCK_STATUS_ACTIVE = 1 ;
-FCK_STATUS_COMPLETE = window.parent.FCK_STATUS_COMPLETE = 2 ;
-
-// Tristate Operations.
-FCK_TRISTATE_OFF = window.parent.FCK_TRISTATE_OFF = 0 ;
-FCK_TRISTATE_ON = window.parent.FCK_TRISTATE_ON = 1 ;
-FCK_TRISTATE_DISABLED = window.parent.FCK_TRISTATE_DISABLED = -1 ;
-
-// For unknown values.
-FCK_UNKNOWN = window.parent.FCK_UNKNOWN = -1000 ;
-
-// Toolbar Items Style.
-FCK_TOOLBARITEM_ONLYICON = window.parent.FCK_TOOLBARITEM_ONLYTEXT = 0 ;
-FCK_TOOLBARITEM_ONLYTEXT = window.parent.FCK_TOOLBARITEM_ONLYTEXT = 1 ;
-FCK_TOOLBARITEM_ICONTEXT = window.parent.FCK_TOOLBARITEM_ONLYTEXT = 2 ;
-
-// Edit Mode
-FCK_EDITMODE_WYSIWYG = window.parent.FCK_EDITMODE_WYSIWYG = 0 ;
-FCK_EDITMODE_SOURCE = window.parent.FCK_EDITMODE_SOURCE = 1 ;
\ No newline at end of file
diff --git a/lib/editor/_source/globals/fckeditorapi.js b/lib/editor/_source/globals/fckeditorapi.js
deleted file mode 100644
index 9b267b7..0000000
--- a/lib/editor/_source/globals/fckeditorapi.js
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- * 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 visit:
- * http://www.fckeditor.net/
- *
- * File Name: fckeditorapi.js
- * Create the FCKeditorAPI object that is available as a global object in
- * the page where the editor is placed in.
- *
- * Version: 2.0 RC2
- * Modified: 2004-05-31 23:07:48
- *
- * File Authors:
- * Frederico Caldeira Knabben (fredck@fckeditor.net)
- */
-
-var FCKeditorAPI ;
-
-if ( !window.parent.FCKeditorAPI )
-{
- // Make the FCKeditorAPI object available in the parent window.
- FCKeditorAPI = window.parent.FCKeditorAPI = new Object() ;
- FCKeditorAPI.__Instances = new Object() ;
-
- // Set the current version.
- FCKeditorAPI.Version = '2.0 RC2' ;
-
- // Function used to get a instance of an existing editor present in the
- // page.
- FCKeditorAPI.GetInstance = function( instanceName )
- {
- return this.__Instances[ instanceName ] ;
- }
-}
-else
- FCKeditorAPI = window.parent.FCKeditorAPI ;
-
-// Add the current instance to the FCKeditorAPI's instances collection.
-FCKeditorAPI.__Instances[ FCK.Name ] = FCK ;
\ No newline at end of file
diff --git a/lib/editor/_source/internals/fck.js b/lib/editor/_source/internals/fck.js
deleted file mode 100644
index 29a7e1b..0000000
--- a/lib/editor/_source/internals/fck.js
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
- * 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 visit:
- * http://www.fckeditor.net/
- *
- * File Name: fck.js
- * Creation and initialization of the "FCK" object. This is the main object
- * that represents an editor instance.
- *
- * Version: 2.0 RC2
- * Modified: 2004-05-31 23:07:48
- *
- * File Authors:
- * Frederico Caldeira Knabben (fredck@fckeditor.net)
- */
-
-// FCK represents the active editor instance
-var FCK = new Object() ;
-FCK.Name = FCKURLParams[ 'InstanceName' ] ;
-FCK.LinkedField = window.parent.document.getElementById( FCK.Name ) ;
-
-FCK.Status = FCK_STATUS_NOTLOADED ;
-FCK.EditMode = FCK_EDITMODE_WYSIWYG ;
-
-FCK.PasteEnabled = false ;
diff --git a/lib/editor/_source/internals/fck_1.js b/lib/editor/_source/internals/fck_1.js
deleted file mode 100644
index 6ffbd42..0000000
--- a/lib/editor/_source/internals/fck_1.js
+++ /dev/null
@@ -1,124 +0,0 @@
-/*
- * 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 visit:
- * http://www.fckeditor.net/
- *
- * File Name: fck_1.js
- * This is the first part of the "FCK" object creation. This is the main
- * object that represents an editor instance.
- *
- * Version: 2.0 RC2
- * Modified: 2004-12-20 12:47:38
- *
- * File Authors:
- * Frederico Caldeira Knabben (fredck@fckeditor.net)
- */
-
-FCK.Events = new FCKEvents( FCK ) ;
-FCK.Toolbar = null ;
-
-FCK.StartEditor = function()
-{
- // Get the editor's window and document (DOM)
- this.EditorWindow = window.frames[ 'eEditorArea' ] ;
- this.EditorDocument = this.EditorWindow.document ;
-
- // TODO: Wait stable version and remove the following commented lines.
- // The Base Path of the editor is saved to rebuild relative URL (IE issue).
-// this.BaseUrl = this.EditorDocument.location.protocol + '//' + this.EditorDocument.location.host ;
-
- // Set the editor's startup contents
- this.SetHTML( FCKTools.GetLinkedFieldValue() ) ;
-
- // Set the editor area CSS file.
- FCKTools.AppendStyleSheet( this.EditorDocument, FCKConfig.EditorAreaCSS ) ;
-
- // Attach the editor to the form onsubmit event
- FCKTools.AttachToLinkedFieldFormSubmit( this.UpdateLinkedField ) ;
-
- // Initialize the default browser behaviors (browser specific).
- this.InitializeBehaviors() ;
-}
-
-FCK.SetStatus = function( newStatus )
-{
- this.Status = newStatus ;
-
- if ( newStatus == FCK_STATUS_ACTIVE )
- {
- // Force the focus in the window to go to the editor.
- window.onfocus = window.document.body.onfocus = FCK.Focus ;
-
- // Force the focus in the editor.
- if ( FCKConfig.StartupFocus )
- FCK.Focus() ;
-
-
-
- if ( FCKBrowserInfo.IsIE )
- FCKScriptLoader.AddScript( 'js/fckeditorcode_ie_2.js' ) ;
- else
- FCKScriptLoader.AddScript( 'js/fckeditorcode_gecko_2.js' ) ;
-
- }
-
- this.Events.FireEvent( 'OnStatusChange', newStatus ) ;
- if ( this.OnStatusChange ) this.OnStatusChange( newStatus ) ;
-
-}
-
-FCK.GetHTML = function()
-{
- if ( FCK.EditMode == FCK_EDITMODE_WYSIWYG )
- {
- // TODO: Wait stable version and remove the following commented lines.
-// if ( FCKBrowserInfo.IsIE )
-// FCK.CheckRelativeLinks() ;
-
- return this.EditorDocument.body.innerHTML ;
- }
- else
- return document.getElementById('eSourceField').value ;
-}
-
-FCK.GetXHTML = function()
-{
- var bSource = ( FCK.EditMode == FCK_EDITMODE_SOURCE ) ;
-
- if ( bSource )
- this.SwitchEditMode() ;
-
- // TODO: Wait stable version and remove the following commented lines.
-// if ( FCKBrowserInfo.IsIE )
-// FCK.CheckRelativeLinks() ;
-
- var sXHTML = FCKXHtml.GetXHTML( this.EditorDocument.body ) ;
-
- if ( bSource )
- this.SwitchEditMode() ;
-
- return sXHTML ;
-}
-
-FCK.UpdateLinkedField = function()
-{
- if ( FCKConfig.EnableXHTML )
- FCKTools.SetLinkedFieldValue( FCK.GetXHTML() ) ;
- else
- FCKTools.SetLinkedFieldValue( FCK.GetHTML() ) ;
-}
-
-FCK.ShowContextMenu = function( x, y )
-{
- if ( this.Status != FCK_STATUS_COMPLETE )
- return ;
-
- FCKContextMenu.Show( x, y ) ;
- this.Events.FireEvent( "OnContextMenu" ) ;
-}
-
diff --git a/lib/editor/_source/internals/fck_1_gecko.js b/lib/editor/_source/internals/fck_1_gecko.js
deleted file mode 100644
index 431545b..0000000
--- a/lib/editor/_source/internals/fck_1_gecko.js
+++ /dev/null
@@ -1,156 +0,0 @@
-/*
- * 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 visit:
- * http://www.fckeditor.net/
- *
- * File Name: fck_1_gecko.js
- * This is the first part of the "FCK" object creation. This is the main
- * object that represents an editor instance.
- * (Gecko specific implementations)
- *
- * Version: 2.0 RC2
- * Modified: 2004-12-15 13:26:29
- *
- * File Authors:
- * Frederico Caldeira Knabben (fredck@fckeditor.net)
- */
-
-FCK.Description = "FCKeditor for Gecko Browsers" ;
-
-FCK.InitializeBehaviors = function()
-{
- // Disable Right-Click
- var oOnContextMenu = function( e )
- {
- e.preventDefault() ;
- FCK.ShowContextMenu( e.clientX, e.clientY ) ;
- }
- this.EditorDocument.addEventListener( 'contextmenu', oOnContextMenu, true ) ;
-
- var oOnKeyDown = function( e )
- {
- if ( e.ctrlKey && !e.shiftKey && !e.altKey )
- {
- // Char 86/118 = V/v
- if ( e.which == 86 || e.which == 118 )
- {
- if ( FCK.Status == FCK_STATUS_COMPLETE )
- {
- if ( !FCK.Events.FireEvent( "OnPaste" ) )
- e.preventDefault() ;
- }
- else
- e.preventDefault() ;
- }
- }
- }
- this.EditorDocument.addEventListener( 'keydown', oOnKeyDown, true ) ;
-
- var oOnSelectionChange = function( e )
- {
- /*
- var bIsDifferent = false ;
- var oActualSel = FCK.EditorWindow.getSelection() ;
-
- if ( FCK.LastSelection )
- {
- if ( FCK.LastSelection.rangeCount != oActualSel.rangeCount )
- {
- bIsDifferent = true ;
- }
- else
- {
- if ( oActualSel.rangeCount == 1 )
- {
- var oRangeA = oActualSel.getRangeAt(0) ;
- var oRangeB = FCK.LastSelection.getRangeAt(0) ;
-
- FCKDebug.Output( 'collapsed: ' + oRangeA.collapsed ) ;
- if ( oRangeA.collapsed )
- {
- FCKDebug.Output( 'startContainerBranch: ' + oRangeA.startContainerBranch + ' == ' + oRangeB.startContainerBranch ) ;
- FCKDebug.Output( 'Container: ' + oRangeA.startContainer.childNodes[ oRangeA.startOffset ] + ' == ' + oRangeB.commonAncestorContainer.parent ) ;
- if
- (
- !oRangeB.collapsed ||
- oRangeA.startContainer.childNodes[ oRangeA.startOffset ] != oRangeB.startContainer.childNodes[ oRangeB.startOffset ] ||
- oRangeA.commonAncestorContainer.parent != oRangeB.commonAncestorContainer.parent )
- {
- bIsDifferent = true ;
- }
- }
- else
- {
- bIsDifferent = true ;
- }
- }
- else
- {
- bIsDifferent == true ;
- }
- }
- }
- else
- {
- bIsDifferent = true ;
- }
-
- FCK.LastSelection = oActualSel ;
-
- FCKDebug.Output( 'bIsDifferent: ' + bIsDifferent ) ;
-
- if ( bIsDifferent )
- {*/
- FCK.Events.FireEvent( "OnSelectionChange" ) ;
- //}
- }
-
- this.EditorDocument.addEventListener( 'mouseup', oOnSelectionChange, false ) ;
- this.EditorDocument.addEventListener( 'keyup', oOnSelectionChange, false ) ;
-
- this.MakeEditable() ;
-
- this.SetStatus( FCK_STATUS_ACTIVE ) ;
-}
-
-FCK.MakeEditable = function()
-{
- this.EditorDocument.designMode = 'on' ;
-
- // Tell Gecko to use or not the tag for the bold, italic and underline.
- this.EditorDocument.execCommand( 'useCSS', false, !FCKConfig.GeckoUseSPAN ) ;
-}
-
-FCK.Focus = function()
-{
- try
- {
- FCK.EditorWindow.focus() ;
- }
- catch(e) {}
-}
-
-FCK.SetHTML = function( html, forceWYSIWYG )
-{
- if ( forceWYSIWYG || FCK.EditMode == FCK_EDITMODE_WYSIWYG )
- {
- // On Gecko we must disable editing before setting the innerHTML.
-// FCK.EditorDocument.designMode = "off" ;
-
- FCK.EditorDocument.body.innerHTML = html ;
-
- // On Gecko we must set the desingMode on again after setting the innerHTML.
-// FCK.EditorDocument.designMode = 'on' ;
-
- // Tell Gecko to use or not the tag for the bold, italic and underline.
-// FCK.EditorDocument.execCommand( "useCSS", false, !FCKConfig.GeckoUseSPAN ) ;
- }
- else
- document.getElementById('eSourceField').value = html ;
-}
-
diff --git a/lib/editor/_source/internals/fck_1_ie.js b/lib/editor/_source/internals/fck_1_ie.js
deleted file mode 100644
index b22728c..0000000
--- a/lib/editor/_source/internals/fck_1_ie.js
+++ /dev/null
@@ -1,181 +0,0 @@
-/*
- * 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 visit:
- * http://www.fckeditor.net/
- *
- * File Name: fck_1_ie.js
- * This is the first part of the "FCK" object creation. This is the main
- * object that represents an editor instance.
- * (IE specific implementations)
- *
- * Version: 2.0 RC2
- * Modified: 2004-12-21 23:51:51
- *
- * File Authors:
- * Frederico Caldeira Knabben (fredck@fckeditor.net)
- */
-
-FCK.Description = "FCKeditor for Internet Explorer 5.5+" ;
-
-FCK.InitializeBehaviors = function()
-{
- // Set the focus to the editable area when clicking in the document area.
- // TODO: The cursor must be positioned at the end.
- this.EditorDocument.onmousedown = this.EditorDocument.onmouseup = function()
- {
- FCK.Focus() ;
-
- FCK.EditorWindow.event.cancelBubble = true ;
- FCK.EditorWindow.event.returnValue = false ;
- }
-
- // Intercept pasting operations
- this.EditorDocument.body.onpaste = function()
- {
- if ( FCK.Status == FCK_STATUS_COMPLETE )
- return FCK.Events.FireEvent( "OnPaste" ) ;
- else
- return false ;
- }
-
- // Disable Right-Click and shows the context menu.
- this.EditorDocument.oncontextmenu = function()
- {
- var e = this.parentWindow.event ;
- FCK.ShowContextMenu( e.screenX, e.screenY ) ;
- return false ;
- }
- // Check if key strokes must be monitored.
- if ( FCKConfig.UseBROnCarriageReturn || FCKConfig.TabSpaces > 0 )
- {
- // Build the "TAB" key replacement.
- if ( FCKConfig.TabSpaces > 0 )
- {
- window.FCKTabHTML = '' ;
- for ( i = 0 ; i < FCKConfig.TabSpaces ; i++ )
- window.FCKTabHTML += " " ;
- }
-
- this.EditorDocument.onkeydown = function()
- {
- var e = FCK.EditorWindow.event ;
-
- if ( e.keyCode == 13 && FCKConfig.UseBROnCarriageReturn ) // ENTER
- {
- if ( (e.ctrlKey || e.altKey || e.shiftKey) )
- return true ;
- else
- {
- // We must ignore it if we are inside a List.
- if ( FCK.EditorDocument.queryCommandState( 'InsertOrderedList' ) || FCK.EditorDocument.queryCommandState( 'InsertUnorderedList' ) )
- return true ;
-
- // Insert the (The must be also inserted to make it work)
- FCK.InsertHtml(" ") ;
-
- // Remove the
- var oRange = FCK.EditorDocument.selection.createRange() ;
- oRange.moveStart('character',-1) ;
- oRange.select() ;
- FCK.EditorDocument.selection.clear() ;
-
- return false ;
- }
- }
- else if ( e.keyCode == 9 && FCKConfig.TabSpaces > 0 && !(e.ctrlKey || e.altKey || e.shiftKey) ) // TAB
- {
- FCK.InsertHtml( window.FCKTabHTML ) ;
- return false ;
- }
-
- return true ;
- }
- }
-
- // Intercept cursor movements
- this.EditorDocument.onselectionchange = function()
- {
- FCK.Events.FireEvent( "OnSelectionChange" ) ;
- }
-
- //Enable editing
- this.EditorDocument.body.contentEditable = true ;
-
- this.SetStatus( FCK_STATUS_ACTIVE ) ;
-}
-
-FCK.Focus = function()
-{
- try
- {
- if ( FCK.EditMode == FCK_EDITMODE_WYSIWYG )
- FCK.EditorDocument.body.focus() ;
- else
- document.getElementById('eSource').focus() ;
- }
- catch(e) {}
-}
-
-FCK.SetHTML = function( html, forceWYSIWYG )
-{
- if ( forceWYSIWYG || FCK.EditMode == FCK_EDITMODE_WYSIWYG )
- {
- // TODO: Wait stable version and remove the following commented lines.
- // In IE, if you do document.body.innerHTML = '
' it throws a "Unknow runtime error".
- // To solve it we must add a fake (safe) tag before it, and then remove it.
- // this.EditorDocument.body.innerHTML = '
' + html.replace( FCKRegexLib.AposEntity, ''' ) ;
- // this.EditorDocument.getElementById('__fakeFCKRemove__').removeNode(true) ;
-
- this.EditorDocument.body.innerHTML = '' ;
- if ( html && html.length > 0 )
- this.EditorDocument.write( html ) ;
- }
- else
- document.getElementById('eSourceField').value = html ;
-}
-
-// TODO: Wait stable version and remove the following commented lines.
-/*
-FCK.CheckRelativeLinks = function()
-{
- // IE automatically change relative URLs to absolute, so we use a trick
- // to solve this problem (the document base points to "fckeditor:".
-
- for ( var i = 0 ; i < this.EditorDocument.links.length ; i++ )
- {
- var e = this.EditorDocument.links[i] ;
-
- if ( e.href.startsWith( FCK.BaseUrl ) )
- e.href = e.href.remove( 0, FCK.BaseUrl.length ) ;
- }
-
- for ( var i = 0 ; i < this.EditorDocument.images.length ; i++ )
- {
- var e = this.EditorDocument.images[i] ;
-
- if ( e.src.startsWith( FCK.BaseUrl ) )
- e.src = e.src.remove( 0, FCK.BaseUrl.length ) ;
- }
-}
-*/
-
-FCK.InsertHtml = function( html )
-{
- FCK.Focus() ;
-
- // Gets the actual selection.
- var oSel = FCK.EditorDocument.selection ;
-
- // Deletes the actual selection contents.
- if ( oSel.type.toLowerCase() != "none" )
- oSel.clear() ;
-
- // Inset the HTML.
- oSel.createRange().pasteHTML( html ) ;
-}
-
diff --git a/lib/editor/_source/internals/fck_2.js b/lib/editor/_source/internals/fck_2.js
deleted file mode 100644
index a3122ee..0000000
--- a/lib/editor/_source/internals/fck_2.js
+++ /dev/null
@@ -1,156 +0,0 @@
-/*
- * 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 visit:
- * http://www.fckeditor.net/
- *
- * File Name: fck_2.js
- * This is the second part of the "FCK" object creation. This is the main
- * object that represents an editor instance.
- *
- * Version: 2.0 RC2
- * Modified: 2004-12-20 14:04:21
- *
- * File Authors:
- * Frederico Caldeira Knabben (fredck@fckeditor.net)
- */
-
-// This collection is used by the browser specific implementations to tell
-// wich named commands must be handled separately.
-FCK.RedirectNamedCommands = new Object() ;
-
-FCK.ExecuteNamedCommand = function( commandName, commandParameter )
-{
- if ( FCK.RedirectNamedCommands[ commandName ] != null )
- FCK.ExecuteRedirectedNamedCommand( commandName, commandParameter ) ;
- else
- {
- FCK.Focus() ;
- FCK.EditorDocument.execCommand( commandName, false, commandParameter ) ;
- FCK.Events.FireEvent( 'OnSelectionChange' ) ;
- }
-}
-
-FCK.GetNamedCommandState = function( commandName )
-{
- try
- {
- if ( !FCK.EditorDocument.queryCommandEnabled( commandName ) )
- return FCK_TRISTATE_DISABLED ;
- else
- return FCK.EditorDocument.queryCommandState( commandName ) ? FCK_TRISTATE_ON : FCK_TRISTATE_OFF ;
- }
- catch ( e )
- {
- return FCK_TRISTATE_OFF ;
- }
-}
-
-FCK.GetNamedCommandValue = function( commandName )
-{
- var sValue = '' ;
- var eState = FCK.GetNamedCommandState( commandName ) ;
-
- if ( eState == FCK_TRISTATE_DISABLED )
- return null ;
-
- try
- {
- sValue = this.EditorDocument.queryCommandValue( commandName ) ;
- }
- catch(e) {}
-
- return sValue ? sValue : '' ;
-}
-
-FCK.CleanAndPaste = function( html )
-{
- // Remove all SPAN tags
- html = html.replace(/<\/?SPAN[^>]*>/gi, "" );
- // Remove Class attributes
- html = html.replace(/<(\w[^>]*) class=([^ |>]*)([^>]*)/gi, "<$1$3") ;
- // Remove Style attributes
- html = html.replace(/<(\w[^>]*) style="([^"]*)"([^>]*)/gi, "<$1$3") ;
- // Remove Lang attributes
- html = html.replace(/<(\w[^>]*) lang=([^ |>]*)([^>]*)/gi, "<$1$3") ;
- // Remove XML elements and declarations
- html = html.replace(/<\\?\?xml[^>]*>/gi, "") ;
- // Remove Tags with XML namespace declarations:
- html = html.replace(/<\/?\w+:[^>]*>/gi, "") ;
- // Replace the
- html = html.replace(/ /, " " );
- // Transform
to
- var re = new RegExp("(
]*>.*?)(<\/P>)","gi") ; // Different because of a IE 5.0 error
- html = html.replace( re, "
" ) ;
-
- FCK.InsertHtml( html ) ;
-}
-
-FCK.Preview = function()
-{
- var oWindow = window.open( '', null, 'toolbar=yes,location=yes,status=yes,menubar=yes,scrollbars=yes,resizable=yes' ) ;
-
- var sHTML = '' + FCK.GetHTML() + '' ;
-
- oWindow.document.write( sHTML );
- oWindow.document.close();
-
- // TODO: The CSS of the editor area must be configurable.
- // oWindow.document.createStyleSheet( config.EditorAreaCSS );
-}
-
-FCK.SwitchEditMode = function()
-{
- // Check if the actual mode is WYSIWYG.
- var bWYSIWYG = ( FCK.EditMode == FCK_EDITMODE_WYSIWYG ) ;
-
- // Display/Hide the TRs.
- document.getElementById('eWysiwyg').style.display = bWYSIWYG ? 'none' : '' ;
- document.getElementById('eSource').style.display = bWYSIWYG ? '' : 'none' ;
-
- // Update the HTML in the view output to show.
- if ( bWYSIWYG )
- document.getElementById('eSourceField').value = ( FCKConfig.EnableXHTML && FCKConfig.EnableSourceXHTML ? FCK.GetXHTML() : FCK.GetHTML() ) ;
- else
- {
- FCK.SetHTML( FCK.GetHTML(), true ) ;
-
- // Gecko looses the editing capabilities when hidding the IFRAME, so we must reset it.
- if ( FCKBrowserInfo.IsGecko )
- FCK.MakeEditable() ;
- }
-
- // Updates the actual mode status.
- FCK.EditMode = bWYSIWYG ? FCK_EDITMODE_SOURCE : FCK_EDITMODE_WYSIWYG ;
-
- // Set the Focus.
- FCK.Focus() ;
-
- // Update the toolbar.
- FCKToolbarSet.RefreshItemsState() ;
-}
-
-
-FCK.CreateElement = function( tag )
-{
- var e = FCK.EditorDocument.createElement( tag ) ;
- e.setAttribute( '__FCKTempLabel', '1' ) ;
-
- this.InsertElement( e ) ;
-
- var aEls = FCK.EditorDocument.getElementsByTagName( tag ) ;
-
- for ( var i = 0 ; i < aEls.length ; i++ )
- {
- if ( aEls[i].attributes['__FCKTempLabel'] )
- {
- aEls[i].removeAttribute( '__FCKTempLabel' ) ;
- return aEls[i] ;
- }
- }
-}
-
diff --git a/lib/editor/_source/internals/fck_2_gecko.js b/lib/editor/_source/internals/fck_2_gecko.js
deleted file mode 100644
index 408fdd5..0000000
--- a/lib/editor/_source/internals/fck_2_gecko.js
+++ /dev/null
@@ -1,204 +0,0 @@
-/*
- * 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 visit:
- * http://www.fckeditor.net/
- *
- * File Name: fck_2_gecko.js
- * This is the second part of the "FCK" object creation. This is the main
- * object that represents an editor instance.
- * (Gecko specific implementations)
- *
- * Version: 2.0 RC2
- * Modified: 2004-12-20 14:04:19
- *
- * File Authors:
- * Frederico Caldeira Knabben (fredck@fckeditor.net)
- */
-
-// GetNamedCommandState overload for Gecko.
-FCK._BaseGetNamedCommandState = FCK.GetNamedCommandState ;
-FCK.GetNamedCommandState = function( commandName )
-{
- switch ( commandName )
- {
- case 'Unlink' :
- return FCKSelection.HasAncestorNode('A') ? FCK_TRISTATE_OFF : FCK_TRISTATE_DISABLED ;
- default :
- return FCK._BaseGetNamedCommandState( commandName ) ;
- }
-}
-
-// Named commands to be handled by this browsers specific implementation.
-FCK.RedirectNamedCommands =
-{
- Print : true,
- Paste : true,
- Cut : true,
- Copy : true
-}
-
-// ExecuteNamedCommand overload for Gecko.
-FCK.ExecuteRedirectedNamedCommand = function( commandName, commandParameter )
-{
- switch ( commandName )
- {
- case 'Print' :
- FCK.EditorWindow.print() ;
- break ;
- case 'Paste' :
- try { if ( FCK.Paste() ) FCK._BaseExecuteNamedCommand( 'Paste' ) ; }
- catch (e) { alert( FCKLang.PasteErrorPaste ) ; }
- break ;
- case 'Cut' :
- try { FCK._BaseExecuteNamedCommand( 'Cut' ) ; }
- catch (e) { alert( FCKLang.PasteErrorCut ) ; }
- break ;
- case 'Copy' :
- try { FCK._BaseExecuteNamedCommand( 'Copy' ) ; }
- catch (e) { alert( FCKLang.PasteErrorCopy ) ; }
- break ;
- default :
- FCK.ExecuteNamedCommand( commandName, commandParameter ) ;
- }
-}
-
-FCK.AttachToOnSelectionChange = function( functionPointer )
-{
- this.Events.AttachEvent( 'OnSelectionChange', functionPointer ) ;
-}
-
-FCK.Paste = function()
-{
- if ( FCKConfig.ForcePasteAsPlainText )
- {
- FCK.PasteAsPlainText() ;
- return false ;
- }
- else if ( FCKConfig.AutoDetectPasteFromWord && FCKBrowserInfo.IsIE55OrMore )
- {
- var sHTML = FCK.GetClipboardHTML() ;
- var re = /<\w[^>]* class="?MsoNormal"?/gi ;
- if ( re.test( sHTML ) )
- {
- if ( confirm( FCKLang["PasteWordConfirm"] ) )
- {
- FCK.CleanAndPaste( sHTML ) ;
- return false ;
- }
- }
- }
- else
- return true ;
-}
-
-//**
-// FCK.InsertHtml: Inserts HTML at the current cursor location. Deletes the
-// selected content if any.
-FCK.InsertHtml = function( html )
-{
- // Delete the actual selection.
- var oSel = FCKSelection.Delete() ;
-
-// var oContainer = oSel.getRangeAt(0).startContainer ;
-// var iOffSet = oSel.getRangeAt(0).startOffset ;
-
- // Get the first available range.
- var oRange = oSel.getRangeAt(0) ;
-
-// var oRange = this.EditorDocument.createRange() ;
-// oRange.setStart( oContainer, iOffSet ) ;
-// oRange.setEnd( oContainer, iOffSet ) ;
-
- // Create a fragment with the input HTML.
- var oFragment = oRange.createContextualFragment( html ) ;
-
- // Get the last available node.
- var oLastNode = oFragment.lastChild ;
-
- // Insert the fragment in the range.
- oRange.insertNode(oFragment) ;
-
- // Set the cursor after the inserted fragment.
- oRange.setEndAfter( oLastNode ) ;
- oRange.setStartAfter( oLastNode ) ;
-
- oSel.removeAllRanges() ;
- oSel = FCK.EditorWindow.getSelection() ;
- oSel.addRange( oRange ) ;
-
- this.Focus() ;
-}
-
-FCK.InsertElement = function( element )
-{
- // Deletes the actual selection.
- var oSel = FCKSelection.Delete() ;
-
- // Gets the first available range.
- var oRange = oSel.getRangeAt(0) ;
-
- // Inserts the element in the range.
- oRange.insertNode( element ) ;
-
- // Set the cursor after the inserted fragment.
- oRange.setEndAfter( element ) ;
- oRange.setStartAfter( element ) ;
-
- this.Focus() ;
-}
-
-FCK.PasteAsPlainText = function()
-{
- // TODO: Implement the "Paste as Plain Text" code.
-
- FCKDialog.OpenDialog( 'FCKDialog_Paste', FCKLang.PasteAsText, 'dialog/fck_paste.html', 400, 330, 'PlainText' ) ;
-
-/*
- var sText = FCKTools.HTMLEncode( clipboardData.getData("Text") ) ;
- sText = sText.replace( /\n/g, ' ' ) ;
- this.InsertHtml( sText ) ;
-*/
-}
-
-FCK.PasteFromWord = function()
-{
- // TODO: Implement the "Paste as Plain Text" code.
-
- FCKDialog.OpenDialog( 'FCKDialog_Paste', FCKLang.PasteFromWord, 'dialog/fck_paste.html', 400, 330, 'Word' ) ;
-
-// FCK.CleanAndPaste( FCK.GetClipboardHTML() ) ;
-}
-
-FCK.GetClipboardHTML = function()
-{
- return '' ;
-}
-
-FCK.CreateLink = function( url )
-{
- FCK.ExecuteNamedCommand( 'Unlink' ) ;
-
- if ( url.length > 0 )
- {
- // Generate a temporary name for the link.
- var sTempUrl = 'javascript:void(0);/*' + ( new Date().getTime() ) + '*/' ;
-
- // Use the internal "CreateLink" command to create the link.
- FCK.ExecuteNamedCommand( 'CreateLink', sTempUrl ) ;
-
- // Retrieve the just created link using XPath.
- var oLink = document.evaluate("//a[@href='" + sTempUrl + "']", this.EditorDocument.body, null, 9, null).singleNodeValue ;
-
- if ( oLink )
- {
- oLink.href = url ;
- return oLink ;
- }
- }
-}
-
diff --git a/lib/editor/_source/internals/fck_2_ie.js b/lib/editor/_source/internals/fck_2_ie.js
deleted file mode 100644
index 7df7aaf..0000000
--- a/lib/editor/_source/internals/fck_2_ie.js
+++ /dev/null
@@ -1,152 +0,0 @@
-/*
- * 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 visit:
- * http://www.fckeditor.net/
- *
- * File Name: fck_2_ie.js
- * This is the second part of the "FCK" object creation. This is the main
- * object that represents an editor instance.
- * (IE specific implementations)
- *
- * Version: 2.0 RC2
- * Modified: 2004-12-20 14:04:16
- *
- * File Authors:
- * Frederico Caldeira Knabben (fredck@fckeditor.net)
- */
-
-/*
-if ( FCKConfig.UseBROnCarriageReturn )
-{
- // Named commands to be handled by this browsers specific implementation.
- FCK.RedirectNamedCommands =
- {
- InsertOrderedList : true,
- InsertUnorderedList : true
- }
-
- FCK.ExecuteRedirectedNamedCommand = function( commandName, commandParameter )
- {
- if ( commandName == 'InsertOrderedList' || commandName == 'InsertUnorderedList' )
- {
- if ( !(FCK.EditorDocument.queryCommandState( 'InsertOrderedList' ) || FCK.EditorDocument.queryCommandState( 'InsertUnorderedList' )) )
- {
- }
- }
-
- FCK.ExecuteNamedCommand( commandName, commandParameter ) ;
- }
-}
-*/
-
-FCK.Paste = function()
-{
- if ( FCKConfig.ForcePasteAsPlainText )
- {
- FCK.PasteAsPlainText() ;
- return false ;
- }
- else if ( FCKConfig.AutoDetectPasteFromWord && FCKBrowserInfo.IsIE55OrMore )
- {
- var sHTML = FCK.GetClipboardHTML() ;
- var re = /<\w[^>]* class="?MsoNormal"?/gi ;
- if ( re.test( sHTML ) )
- {
- if ( confirm( FCKLang["PasteWordConfirm"] ) )
- {
- FCK.CleanAndPaste( sHTML ) ;
- return false ;
- }
- }
- }
- else
- return true ;
-}
-
-FCK.PasteAsPlainText = function()
-{
- // Get the data available in the clipboard and encodes it in HTML.
- var sText = FCKTools.HTMLEncode( clipboardData.getData("Text") ) ;
-
- // Replace the carriage returns with
- sText = sText.replace( /\n/g, ' ' ) ;
-
- // Insert the resulting data in the editor.
- this.InsertHtml( sText ) ;
-}
-
-FCK.PasteFromWord = function()
-{
- FCK.CleanAndPaste( FCK.GetClipboardHTML() ) ;
-}
-
-FCK.InsertElement = function( element )
-{
- FCK.InsertHtml( element.outerHTML ) ;
-}
-
-FCK.GetClipboardHTML = function()
-{
- var oDiv = document.getElementById( '___FCKHiddenDiv' ) ;
-
- if ( !oDiv )
- {
- var oDiv = document.createElement( 'DIV' ) ;
- oDiv.id = '___FCKHiddenDiv' ;
- oDiv.style.visibility = 'hidden' ;
- oDiv.style.overflow = 'hidden' ;
- oDiv.style.position = 'absolute' ;
- oDiv.style.width = 1 ;
- oDiv.style.height = 1 ;
-
- document.body.appendChild( oDiv ) ;
- }
-
- oDiv.innerHTML = '' ;
-
- var oTextRange = document.body.createTextRange() ;
- oTextRange.moveToElementText( oDiv ) ;
- oTextRange.execCommand( 'Paste' ) ;
-
- var sData = oDiv.innerHTML ;
- oDiv.innerHTML = '' ;
-
- return sData ;
-}
-
-FCK.AttachToOnSelectionChange = function( functionPointer )
-{
- FCK.EditorDocument.attachEvent( 'onselectionchange', functionPointer ) ;
-}
-
-FCK.CreateLink = function( url )
-{
- FCK.ExecuteNamedCommand( 'Unlink' ) ;
-
- if ( url.length > 0 )
- {
- // Generate a temporary name for the link.
- var sTempUrl = 'javascript:void(0);/*' + ( new Date().getTime() ) + '*/' ;
-
- // Use the internal "CreateLink" command to create the link.
- FCK.ExecuteNamedCommand( 'CreateLink', sTempUrl ) ;
-
- // Loof for the just create link.
- var oLinks = this.EditorDocument.links ;
-
- for ( i = 0 ; i < oLinks.length ; i++ )
- {
- if ( oLinks[i].href == sTempUrl )
- {
- oLinks[i].href = url ;
- return oLinks[i] ;
- }
- }
- }
-}
-
diff --git a/lib/editor/_source/internals/fck_last.js b/lib/editor/_source/internals/fck_last.js
deleted file mode 100644
index cbd179f..0000000
--- a/lib/editor/_source/internals/fck_last.js
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
- * 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 visit:
- * http://www.fckeditor.net/
- *
- * File Name: fck_last.js
- * These are the last script lines executed in the editor loading process.
- *
- * Version: 2.0 RC2
- * Modified: 2004-12-04 16:53:16
- *
- * File Authors:
- * Frederico Caldeira Knabben (fredck@fckeditor.net)
- */
-
-// This is the last file loaded to complete the editor initialization and activation
-
-// Just check if the document direction has been correctly applied (at fck_onload.js).
-if ( FCKLang && window.document.dir.toLowerCase() != FCKLang.Dir.toLowerCase() )
- window.document.dir = FCKLang.Dir ;
-
-// Activate pasting operations.
-if ( FCKConfig.ForcePasteAsPlainText )
- FCK.Events.AttachEvent( "OnPaste", FCK.Paste ) ;
-
-// Load Plugins.
-if ( FCKPlugins.Items.length > 0 )
-{
- FCKScriptLoader.OnEmpty = CompleteLoading ;
- FCKPlugins.Load() ;
-}
-else
- CompleteLoading() ;
-
-function CompleteLoading()
-{
- // Load the Toolbar
- FCKToolbarSet.Name = FCKURLParams['Toolbar'] || 'Default' ;
- FCKToolbarSet.Load( FCKToolbarSet.Name ) ;
- FCKToolbarSet.Restart() ;
-
- FCK.AttachToOnSelectionChange( FCKToolbarSet.RefreshItemsState ) ;
- //FCK.AttachToOnSelectionChange( FCKSelection._Reset ) ;
-
- FCK.SetStatus( FCK_STATUS_COMPLETE ) ;
-
- // Call the special "FCKeditor_OnComplete" function that should be present in
- // the HTML page where the editor is located.
- if ( typeof( window.parent.FCKeditor_OnComplete ) == 'function' )
- window.parent.FCKeditor_OnComplete( FCK ) ;
-}
\ No newline at end of file
diff --git a/lib/editor/_source/internals/fck_onload.js b/lib/editor/_source/internals/fck_onload.js
deleted file mode 100644
index 4e13f59..0000000
--- a/lib/editor/_source/internals/fck_onload.js
+++ /dev/null
@@ -1,109 +0,0 @@
-/*
- * 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 visit:
- * http://www.fckeditor.net/
- *
- * File Name: fck_onload.js
- * This is the script that is called when the editor page is loaded inside
- * its IFRAME. It's the editor startup.
- *
- * Version: 2.0 RC2
- * Modified: 2004-11-30 11:38:24
- *
- * File Authors:
- * Frederico Caldeira Knabben (fredck@fckeditor.net)
- */
-
-// Disable the context menu in the editor (areas outside the editor area).
-window.document.oncontextmenu = function( e )
-{
- if ( e )
- e.preventDefault() ; // This is the Gecko way to do that.
- return false ; // This is the IE way to do that.
-}
-
-// Gecko browsers doens't calculate well that IFRAME size so we must
-// recalculate it every time the window size changes.
-if ( ! FCKBrowserInfo.IsIE )
-{
- window.onresize = function()
- {
- var oFrame = document.getElementById('eEditorArea') ;
- oFrame.height = 0 ;
-
- var oCell = document.getElementById( FCK.EditMode == FCK_EDITMODE_WYSIWYG ? 'eWysiwygCell' : 'eSource' ) ;
- var iHeight = oCell.offsetHeight ;
-
- oFrame.height = iHeight - 2 ;
- }
-}
-
-// Start the editor as soon as the window is loaded.
-window.onload = function()
-{
- // There is a bug on Netscape when rendering the frame. It goes over the
- // right border. So we must correct it.
- if ( FCKBrowserInfo.IsNetscape )
- document.getElementById('eWysiwygCell').style.paddingRight = '2px' ;
-
- FCKScriptLoader.OnEmpty = function()
- {
- FCKScriptLoader.OnEmpty = null ;
-
- // Override the configurations passed throw the hidden field.
- FCKConfig.LoadHiddenField() ;
-
- // Load the custom configurations file (if defined).
- if ( FCKConfig.CustomConfigurationsPath.length > 0 )
- FCKScriptLoader.AddScript( FCKConfig.CustomConfigurationsPath ) ;
-
- // Load the styles for the configured skin.
- LoadStyles() ;
- }
-
- // First of all load the configuration file.
- FCKScriptLoader.AddScript( '../fckconfig.js' ) ;
-}
-
-function LoadStyles()
-{
- FCKScriptLoader.OnEmpty = LoadScripts ;
-
- // Load the active skin CSS.
- FCKScriptLoader.AddScript( FCKConfig.SkinPath + 'fck_editor.css' ) ;
- FCKScriptLoader.AddScript( FCKConfig.SkinPath + 'fck_contextmenu.css' ) ;
-}
-
-function LoadScripts()
-{
- FCKScriptLoader.OnEmpty = null ;
-
-
- if ( FCKBrowserInfo.IsIE )
- FCKScriptLoader.AddScript( 'js/fckeditorcode_ie_1.js' ) ;
- else
- FCKScriptLoader.AddScript( 'js/fckeditorcode_gecko_1.js' ) ;
-}
-
-function LoadLanguageFile()
-{
- FCKScriptLoader.OnEmpty = function()
- {
- // Removes the OnEmpty listener.
- FCKScriptLoader.OnEmpty = null ;
-
- // Correct the editor layout to the correct language direction.
- if ( FCKLang )
- window.document.dir = FCKLang.Dir ;
-
- // Starts the editor.
- FCK.StartEditor() ;
- }
-
- FCKScriptLoader.AddScript( 'lang/' + FCKLanguageManager.ActiveLanguage.Code + '.js' ) ;
-}
\ No newline at end of file
diff --git a/lib/editor/_source/internals/fckbrowserinfo.js b/lib/editor/_source/internals/fckbrowserinfo.js
deleted file mode 100644
index fb2b441..0000000
--- a/lib/editor/_source/internals/fckbrowserinfo.js
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
- * 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 visit:
- * http://www.fckeditor.net/
- *
- * File Name: fckbrowserinfo.js
- * Defines the FCKBrowserInfo object that hold some browser informations.
- *
- * Version: 2.0 RC2
- * Modified: 2004-11-26 01:20:34
- *
- * File Authors:
- * Frederico Caldeira Knabben (fredck@fckeditor.net)
- */
-
-var FCKBrowserInfo = new Object() ;
-
-var sAgent = navigator.userAgent.toLowerCase() ;
-
-FCKBrowserInfo.IsIE = sAgent.indexOf("msie") != -1 ;
-FCKBrowserInfo.IsGecko = !FCKBrowserInfo.IsIE ;
-FCKBrowserInfo.IsNetscape = sAgent.indexOf("netscape") != -1 ;
-
-if ( FCKBrowserInfo.IsIE )
-{
- FCKBrowserInfo.MajorVer = navigator.appVersion.match(/MSIE (.)/)[1] ;
- FCKBrowserInfo.MinorVer = navigator.appVersion.match(/MSIE .\.(.)/)[1] ;
-}
-else
-{
- // TODO: Other browsers
- FCKBrowserInfo.MajorVer = 0 ;
- FCKBrowserInfo.MinorVer = 0 ;
-}
-
-FCKBrowserInfo.IsIE55OrMore = FCKBrowserInfo.IsIE && ( FCKBrowserInfo.MajorVer > 5 || FCKBrowserInfo.MinorVer >= 5 ) ;
\ No newline at end of file
diff --git a/lib/editor/_source/internals/fckcommands.js b/lib/editor/_source/internals/fckcommands.js
deleted file mode 100644
index ef7c9f6..0000000
--- a/lib/editor/_source/internals/fckcommands.js
+++ /dev/null
@@ -1,95 +0,0 @@
-/*
- * 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 visit:
- * http://www.fckeditor.net/
- *
- * File Name: fckcommands.js
- * Define all commands available in the editor.
- *
- * Version: 2.0 RC2
- * Modified: 2004-12-19 22:51:46
- *
- * File Authors:
- * Frederico Caldeira Knabben (fredck@fckeditor.net)
- */
-
-var FCKCommands = FCK.Commands = new Object() ;
-FCKCommands.LoadedCommands = new Object() ;
-
-FCKCommands.RegisterCommand = function( commandName, command )
-{
- this.LoadedCommands[ commandName ] = command ;
-}
-
-FCKCommands.GetCommand = function( commandName )
-{
- var oCommand = FCKCommands.LoadedCommands[ commandName ] ;
-
- if ( oCommand )
- return oCommand ;
-
- switch ( commandName )
- {
- case 'Link' : oCommand = new FCKDialogCommand( 'Link' , FCKLang.DlgLnkWindowTitle , 'dialog/fck_link.html' , 400, 330, FCK.GetNamedCommandState, 'CreateLink' ) ; break ;
- case 'About' : oCommand = new FCKDialogCommand( 'About' , FCKLang.About , 'dialog/fck_about.html' , 400, 330 ) ; break ;
-
- case 'Find' : oCommand = new FCKDialogCommand( 'Find' , FCKLang.DlgFindTitle , 'dialog/fck_find.html' , 340, 170 ) ; break ;
- case 'Replace' : oCommand = new FCKDialogCommand( 'Replace' , FCKLang.DlgReplaceTitle , 'dialog/fck_replace.html' , 340, 200 ) ; break ;
-
- case 'Image' : oCommand = new FCKDialogCommand( 'Image' , FCKLang.DlgImgTitle , 'dialog/fck_image.html' , 450, 400, FCK.GetNamedCommandState, 'InsertImage' ) ; break ;
- case 'SpecialChar' : oCommand = new FCKDialogCommand( 'SpecialChar', FCKLang.DlgSpecialCharTitle , 'dialog/fck_specialchar.html' , 400, 300, FCK.GetNamedCommandState, 'InsertImage' ) ; break ;
- case 'Smiley' : oCommand = new FCKDialogCommand( 'Smiley' , FCKLang.DlgSmileyTitle , 'dialog/fck_smiley.html' , FCKConfig.SmileyWindowWidth, FCKConfig.SmileyWindowHeight, FCK.GetNamedCommandState, 'InsertImage' ) ; break ;
- case 'Table' : oCommand = new FCKDialogCommand( 'Table' , FCKLang.DlgTableTitle , 'dialog/fck_table.html' , 400, 250 ) ; break ;
- case 'TableProp' : oCommand = new FCKDialogCommand( 'Table' , FCKLang.DlgTableTitle , 'dialog/fck_table.html?Parent', 400, 250 ) ; break ;
- case 'TableCellProp': oCommand = new FCKDialogCommand( 'TableCell' , FCKLang.DlgCellTitle , 'dialog/fck_tablecell.html' , 500, 250 ) ; break ;
-
- case 'Style' : oCommand = new FCKStyleCommand() ; break ;
-
- case 'FontName' : oCommand = new FCKFontNameCommand() ; break ;
- case 'FontSize' : oCommand = new FCKFontSizeCommand() ; break ;
- case 'FontFormat' : oCommand = new FCKFormatBlockCommand() ; break ;
-
- case 'Source' : oCommand = new FCKSourceCommand() ; break ;
- case 'Preview' : oCommand = new FCKPreviewCommand() ; break ;
- case 'Save' : oCommand = new FCKSaveCommand() ; break ;
- case 'NewPage' : oCommand = new FCKNewPageCommand() ; break ;
-
- case 'TextColor' : oCommand = new FCKTextColorCommand('ForeColor') ; break ;
- case 'BGColor' : oCommand = new FCKTextColorCommand('BackColor') ; break ;
-
- case 'PasteText' : oCommand = new FCKPastePlainTextCommand() ; break ;
- case 'PasteWord' : oCommand = new FCKPasteWordCommand() ; break ;
-
- case 'TableInsertRow' : oCommand = new FCKTableCommand('TableInsertRow') ; break ;
- case 'TableDeleteRows' : oCommand = new FCKTableCommand('TableDeleteRows') ; break ;
- case 'TableInsertColumn' : oCommand = new FCKTableCommand('TableInsertColumn') ; break ;
- case 'TableDeleteColumns' : oCommand = new FCKTableCommand('TableDeleteColumns') ; break ;
- case 'TableInsertCell' : oCommand = new FCKTableCommand('TableInsertCell') ; break ;
- case 'TableDeleteCells' : oCommand = new FCKTableCommand('TableDeleteCells') ; break ;
- case 'TableMergeCells' : oCommand = new FCKTableCommand('TableMergeCells') ; break ;
- case 'TableSplitCell' : oCommand = new FCKTableCommand('TableSplitCell') ; break ;
-
- // Generic Undefined command (usually used when a command is under development).
- case 'Undefined' : oCommand = new FCKUndefinedCommand() ; break ;
-
- // By default we assume that it is a named command.
- default:
- if ( FCKRegexLib.NamedCommands.test( commandName ) )
- oCommand = new FCKNamedCommand( commandName ) ;
- else
- {
- alert( FCKLang.UnknownCommand.replace( /%1/g, commandName ) ) ;
- return ;
- }
- }
-
- FCKCommands.LoadedCommands[ commandName ] = oCommand ;
-
- return oCommand ;
-}
-
diff --git a/lib/editor/_source/internals/fckconfig.js b/lib/editor/_source/internals/fckconfig.js
deleted file mode 100644
index a103fe7..0000000
--- a/lib/editor/_source/internals/fckconfig.js
+++ /dev/null
@@ -1,75 +0,0 @@
-/*
- * 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 visit:
- * http://www.fckeditor.net/
- *
- * File Name: fckconfig.js
- * Creates and initializes the FCKConfig object.
- *
- * Version: 2.0 RC2
- * Modified: 2004-11-16 15:56:53
- *
- * File Authors:
- * Frederico Caldeira Knabben (fredck@fckeditor.net)
- */
-
-var FCKConfig = FCK.Config = new Object() ;
-
-// Editor Base Path
-if ( document.location.protocol == 'file:' )
-{
- FCKConfig.BasePath = document.location.pathname.substr(1) ;
- FCKConfig.BasePath = FCKConfig.BasePath.replace( /\\/gi, '/' ) ;
- FCKConfig.BasePath = 'file://' + FCKConfig.BasePath.substring(0,FCKConfig.BasePath.lastIndexOf('/')+1) ;
-}
-else
- FCKConfig.BasePath = document.location.pathname.substring(0,document.location.pathname.lastIndexOf('/')+1) ;
-
-// Override the actual configuration values with the values passed throw the
-// hidden field "___Config".
-FCKConfig.LoadHiddenField = function()
-{
- // Get the hidden field.
- var oConfigField = window.parent.document.getElementById( FCK.Name + '___Config' ) ;
-
- // Do nothing if the config field was not defined.
- if ( ! oConfigField ) return ;
-
- var aCouples = oConfigField.value.split('&') ;
-
- for ( var i = 0 ; i < aCouples.length ; i++ )
- {
- if ( aCouples[i].length == 0 )
- continue ;
-
- var aConfig = aCouples[i].split('=') ;
- var sConfigName = aConfig[0] ;
- var sConfigValue = aConfig[1] ;
-
- if ( sConfigValue.toLowerCase() == "true" ) // If it is a boolean TRUE.
- FCKConfig[sConfigName] = true ;
- else if ( sConfigValue.toLowerCase() == "false" ) // If it is a boolean FALSE.
- FCKConfig[sConfigName] = false ;
- else if ( ! isNaN(sConfigValue) ) // If it is a number.
- FCKConfig[sConfigName] = parseInt( sConfigValue ) ;
- else // In any other case it is a string.
- FCKConfig[sConfigName] = sConfigValue ;
- }
-}
-
-// Define toolbar sets collection.
-FCKConfig.ToolbarSets = new Object() ;
-
-// Defines the plugins collection.
-FCKConfig.Plugins = new Object() ;
-FCKConfig.Plugins.Items = new Array() ;
-
-FCKConfig.Plugins.Add = function( name, langs )
-{
- FCKConfig.Plugins.Items.addItem( [name, langs] ) ;
-}
\ No newline at end of file
diff --git a/lib/editor/_source/internals/fckcontextmenu.js b/lib/editor/_source/internals/fckcontextmenu.js
deleted file mode 100644
index 377765c..0000000
--- a/lib/editor/_source/internals/fckcontextmenu.js
+++ /dev/null
@@ -1,192 +0,0 @@
-/*
- * 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 visit:
- * http://www.fckeditor.net/
- *
- * File Name: fckcontextmenu.js
- * Defines the FCKContextMenu object that is responsible for all
- * Context Menu operations.
- *
- * Version: 2.0 RC2
- * Modified: 2004-12-20 00:19:50
- *
- * File Authors:
- * Frederico Caldeira Knabben (fredck@fckeditor.net)
- */
-
-var FCKContextMenu = new Object() ;
-
-// This property is internally used to indicate that the context menu has been created.
-FCKContextMenu._IsLoaded = false ;
-
-// This method creates the context menu inside a DIV tag. Take a look at the end of this file for a sample output.
-FCKContextMenu.Reload = function()
-{
- // Create the Main DIV that holds the Context Menu.
- this._Div = this._Document.createElement( 'DIV' ) ;
- this._Div.className = 'CM_ContextMenu' ;
- this._Div.style.position = 'absolute' ;
- this._Div.style.visibility = 'hidden' ;
- this._Document.body.appendChild( this._Div );
-
- // Create the main table for the menu items.
- var oTable = this._Document.createElement( 'TABLE' ) ;
- oTable.cellSpacing = 0 ;
- oTable.cellPadding = 0 ;
- oTable.border = 0 ;
- this._Div.appendChild( oTable ) ;
-
- // Create arrays with all Items to add.
-
- this.Groups = new Object() ;
-
- // Generic items that are always available.
- this.Groups['Generic'] = new FCKContextMenuGroup() ;
- with ( this.Groups['Generic'] )
- {
- Add( new FCKContextMenuItem( this, 'Cut' , FCKLang.Cut , true ) ) ;
- Add( new FCKContextMenuItem( this, 'Copy' , FCKLang.Copy , true ) ) ;
- Add( new FCKContextMenuItem( this, 'Paste' , FCKLang.Paste , true ) ) ;
- }
-
- // Link operations.
- this.Groups['Link'] = new FCKContextMenuGroup() ;
- with ( this.Groups['Link'] )
- {
- Add( new FCKContextMenuSeparator() ) ;
- Add( new FCKContextMenuItem( this, 'Link' , FCKLang.EditLink , true ) ) ;
- Add( new FCKContextMenuItem( this, 'Unlink' , FCKLang.RemoveLink, true ) ) ;
- }
-
- // Table Cell operations.
- this.Groups['TableCell'] = new FCKContextMenuGroup() ;
- with ( this.Groups['TableCell'] )
- {
- Add( new FCKContextMenuSeparator() ) ;
- Add( new FCKContextMenuItem( this, 'TableInsertRow' , FCKLang.InsertRow, true ) ) ;
- Add( new FCKContextMenuItem( this, 'TableDeleteRows' , FCKLang.DeleteRows, true ) ) ;
- Add( new FCKContextMenuSeparator() ) ;
- Add( new FCKContextMenuItem( this, 'TableInsertColumn' , FCKLang.InsertColumn, true ) ) ;
- Add( new FCKContextMenuItem( this, 'TableDeleteColumns' , FCKLang.DeleteColumns, true ) ) ;
- Add( new FCKContextMenuSeparator() ) ;
- Add( new FCKContextMenuItem( this, 'TableInsertCell' , FCKLang.InsertCell, true ) ) ;
- Add( new FCKContextMenuItem( this, 'TableDeleteCells' , FCKLang.DeleteCells, true ) ) ;
- Add( new FCKContextMenuItem( this, 'TableMergeCells' , FCKLang.MergeCells, true ) ) ;
- Add( new FCKContextMenuItem( this, 'TableSplitCell' , FCKLang.SplitCell, true ) ) ;
- Add( new FCKContextMenuSeparator() ) ;
- Add( new FCKContextMenuItem( this, 'TableCellProp' , FCKLang.CellProperties, true ) ) ;
- Add( new FCKContextMenuItem( this, 'TableProp' , FCKLang.TableProperties, true ) ) ;
- }
-
- // Table operations.
- this.Groups['Table'] = new FCKContextMenuGroup() ;
- with ( this.Groups['Table'] )
- {
- Add( new FCKContextMenuSeparator() ) ;
- Add( new FCKContextMenuItem( this, 'Table', FCKLang.TableProperties, true ) ) ;
- }
-
- // Image operations.
- this.Groups['Image'] = new FCKContextMenuGroup() ;
- with ( this.Groups['Image'] )
- {
- Add( new FCKContextMenuSeparator() ) ;
- Add( new FCKContextMenuItem( this, 'Image', FCKLang.ImageProperties, true ) ) ;
- }
-
- // Select field operations.
- this.Groups['Select'] = new FCKContextMenuGroup() ;
- with ( this.Groups['Select'] )
- {
- Add( new FCKContextMenuSeparator() ) ;
- Add( new FCKContextMenuItem( this, 'Undefined', "Selection Field Properties" ) ) ;
- }
-
- // Textarea operations.
- this.Groups['Textarea'] = new FCKContextMenuGroup() ;
- with ( this.Groups['Textarea'] )
- {
- Add( new FCKContextMenuSeparator() ) ;
- Add( new FCKContextMenuItem( this, 'Undefined', "Textarea Properties" ) ) ;
- }
-
- // Create all table rows (representing the items) in the context menu.
- for ( var o in this.Groups )
- {
- this.Groups[o].CreateTableRows( oTable ) ;
- }
-
- this._IsLoaded = true ;
-}
-
-FCKContextMenu.RefreshState = function()
-{
- // Get the actual selected tag (if any).
- var oTag = FCKSelection.GetSelectedElement() ;
- var sTagName ;
-
- if ( oTag )
- {
- sTagName = oTag.tagName ;
- }
-
- // Set items visibility.
- this.Groups['Link'].SetVisible( FCK.GetNamedCommandState( 'Unlink' ) != FCK_TRISTATE_DISABLED ) ;
- this.Groups['TableCell'].SetVisible( sTagName != 'TABLE' && FCKSelection.HasAncestorNode('TABLE') ) ;
- this.Groups['Table'].SetVisible( sTagName == 'TABLE' ) ;
- this.Groups['Image'].SetVisible( sTagName == 'IMG' ) ;
- this.Groups['Select'].SetVisible( sTagName == 'SELECT' ) ;
- this.Groups['Textarea'].SetVisible( sTagName == 'TEXTAREA' ) ;
-
- // Refresh the state of all visible items (active/disactive)
- for ( var o in this.Groups )
- {
- this.Groups[o].RefreshState() ;
- }
-}
-
-/*
-Sample Context Menu Output
------------------------------------------
-
- Magnus es, domine, et laudabilis
- valde: magna virtus tua, et sapientiae tuae non est numerus. et laudare te vult
- homo, aliqua portio creaturae tuae, et homo circumferens mortalitem suam,
- circumferens testimonium peccati sui et testimonium, quia superbis resistis: et
- tamen laudare te vult homo, aliqua portio creaturae tuae.tu excitas, ut laudare
- te delectet, quia fecisti nos ad te et inquietum est cor nostrum, donec
- requiescat in te. da mihi, domine, scire et intellegere, utrum sit prius
- invocare te an laudare te, et scire te prius sit an invocare te. sed quis te
- invocat nesciens te? aliud enim pro alio potest invocare nesciens. an potius
- invocaris, ut sciaris? quomodo autem invocabunt, in quem non crediderunt? aut
- quomodo credent sine praedicante? et laudabunt dominum qui requirunt eum.
- quaerentes enim inveniunt eum et invenientes laudabunt eum. quaeram te, domine,
- invocans te, et invocem te credens in te: praedicatus enim es nobis. invocat
- te, domine, fides mea, quam dedisti mihi, quam inspirasti mihi per humanitatem
- filii tui, per ministerium praedicatoris tui.
-
- The editor was not able to automaticaly execute pasting
- because of the security settings of your browser.
-
- Please paste inside the following box using the keyboard (Ctrl+V)
- and hit OK.
-