Update of /cvsroot/phpslash/phpslash-dev/public_html/scripts/fckeditor/editor/_source/internals
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6803/phpslash-dev/public_html/scripts/fckeditor/editor/_source/internals
Modified Files:
fck.js fck_1.js fck_1_gecko.js fck_1_ie.js fck_2.js
fck_2_gecko.js fck_2_ie.js fck_last.js fck_onload.js
fckbrowserinfo.js fckcommands.js fckconfig.js
fckcontextmenu.js fckcontextmenu_gecko.js fckcontextmenu_ie.js
fckdebug.js fckdialog.js fckdialog_gecko.js fckdialog_ie.js
fcklanguagemanager.js fckscriptloader.js fckselection.js
fckselection_gecko.js fckselection_ie.js fcktoolbaritems.js
fcktoolbarset.js fcktools.js fcktools_gecko.js fcktools_ie.js
fckurlparams.js fckxhtml.js
Log Message:
complete fckeditor addition
Index: fck.js
===================================================================
RCS file: /cvsroot/phpslash/phpslash-dev/public_html/scripts/fckeditor/editor/_source/internals/fck.js,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** fck.js 28 Oct 2004 20:17:42 -0000 1.1
--- fck.js 30 Oct 2004 13:53:12 -0000 1.2
***************
*** 13,17 ****
* that represents an editor instance.
*
! * Version: 2.0 Beta 1
* Modified: 2004-05-31 23:07:48
*
--- 13,17 ----
* that represents an editor instance.
*
! * Version: 2.0 Beta 2
* Modified: 2004-05-31 23:07:48
*
Index: fck_1.js
===================================================================
RCS file: /cvsroot/phpslash/phpslash-dev/public_html/scripts/fckeditor/editor/_source/internals/fck_1.js,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** fck_1.js 28 Oct 2004 20:17:42 -0000 1.1
--- fck_1.js 30 Oct 2004 13:53:12 -0000 1.2
***************
*** 13,18 ****
* object that represents an editor instance.
*
! * Version: 2.0 Beta 1
! * Modified: 2004-05-31 23:07:48
*
* File Authors:
--- 13,18 ----
* object that represents an editor instance.
*
! * Version: 2.0 Beta 2
! * Modified: 2004-09-05 02:19:46
*
* File Authors:
***************
*** 29,32 ****
--- 29,36 ----
if ( newStatus == FCK_STATUS_ACTIVE )
{
+ // Force the focus in the editor.
+ if ( FCKConfig.StartupFocus )
+ FCK.Focus() ;
+
***************
*** 53,59 ****
this.EditorDocument.body.innerHTML = html ;
- // On Gecko we must set the desingMode on again after setting the innerHTML.
if ( FCKBrowserInfo.IsGecko )
FCK.EditorDocument.designMode = "on" ;
}
else
--- 57,68 ----
this.EditorDocument.body.innerHTML = html ;
if ( FCKBrowserInfo.IsGecko )
+ {
+ // On Gecko we must set the desingMode on again after setting the innerHTML.
FCK.EditorDocument.designMode = "on" ;
+
+ // Tell Gecko to use or not the <SPAN> tag for the bold, italic and underline.
+ FCK.EditorDocument.execCommand( "useCSS", false, !FCKConfig.GeckoUseSPAN ) ;
+ }
}
else
***************
*** 92,103 ****
}
- FCK.Focus = function()
- {
- if ( FCK.EditMode == FCK_EDITMODE_WYSIWYG )
- FCK.EditorDocument.body.focus() ;
- else
- document.getElementById('eSource').focus() ;
- }
-
FCK.ShowContextMenu = function( x, y )
{
--- 101,104 ----
Index: fck_1_gecko.js
===================================================================
RCS file: /cvsroot/phpslash/phpslash-dev/public_html/scripts/fckeditor/editor/_source/internals/fck_1_gecko.js,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** fck_1_gecko.js 28 Oct 2004 20:17:42 -0000 1.1
--- fck_1_gecko.js 30 Oct 2004 13:53:12 -0000 1.2
***************
*** 14,19 ****
* (Gecko specific implementations)
*
! * Version: 2.0 Beta 1
! * Modified: 2004-05-31 23:07:48
*
* File Authors:
--- 14,19 ----
* (Gecko specific implementations)
*
! * Version: 2.0 Beta 2
! * Modified: 2004-08-30 22:47:52
*
* File Authors:
***************
*** 124,131 ****
this.EditorDocument.addEventListener( 'keyup', oOnSelectionChange, false ) ;
- //Enable editing
- this.EditorDocument.designMode = "on" ;
-
this.SetStatus( FCK_STATUS_ACTIVE ) ;
}
--- 124,133 ----
this.EditorDocument.addEventListener( 'keyup', oOnSelectionChange, false ) ;
this.SetStatus( FCK_STATUS_ACTIVE ) ;
}
+ FCK.Focus = function()
+ {
+ this.EditorWindow.focus() ;
+ }
+
Index: fck_1_ie.js
===================================================================
RCS file: /cvsroot/phpslash/phpslash-dev/public_html/scripts/fckeditor/editor/_source/internals/fck_1_ie.js,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** fck_1_ie.js 28 Oct 2004 20:17:42 -0000 1.1
--- fck_1_ie.js 30 Oct 2004 13:53:12 -0000 1.2
***************
*** 14,19 ****
* (IE specific implementations)
*
! * Version: 2.0 Beta 1
! * Modified: 2004-05-31 23:07:48
*
* File Authors:
--- 14,19 ----
* (IE specific implementations)
*
! * Version: 2.0 Beta 2
! * Modified: 2004-08-30 22:48:10
*
* File Authors:
***************
*** 34,37 ****
--- 34,47 ----
// Attach the editor to the form onsubmit event
FCKTools.AttachToLinkedFieldFormSubmit( this.UpdateLinkedField ) ;
+
+ // 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
***************
*** 64,65 ****
--- 74,83 ----
}
+ FCK.Focus = function()
+ {
+ if ( FCK.EditMode == FCK_EDITMODE_WYSIWYG )
+ FCK.EditorDocument.body.focus() ;
+ else
+ document.getElementById('eSource').focus() ;
+ }
+
Index: fck_2.js
===================================================================
RCS file: /cvsroot/phpslash/phpslash-dev/public_html/scripts/fckeditor/editor/_source/internals/fck_2.js,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** fck_2.js 28 Oct 2004 20:17:42 -0000 1.1
--- fck_2.js 30 Oct 2004 13:53:12 -0000 1.2
***************
*** 13,18 ****
* object that represents an editor instance.
*
! * Version: 2.0 Beta 1
! * Modified: 2004-05-31 23:07:49
*
* File Authors:
--- 13,18 ----
* object that represents an editor instance.
*
! * Version: 2.0 Beta 2
! * Modified: 2004-09-07 01:11:37
*
* File Authors:
***************
*** 22,27 ****
FCK.ExecuteNamedCommand = function( commandName, commandParameter )
{
! this.EditorDocument.execCommand( commandName, false, commandParameter ) ;
! this.Events.FireEvent( 'OnSelectionChange' ) ;
}
--- 22,28 ----
FCK.ExecuteNamedCommand = function( commandName, commandParameter )
{
! FCK.Focus() ;
! FCK.EditorDocument.execCommand( commandName, false, commandParameter ) ;
! FCK.Events.FireEvent( 'OnSelectionChange' ) ;
}
***************
*** 61,68 ****
{
if ( url.length == 0 )
! this.ExecuteNamedCommand( 'Unlink' ) ;
else
{
! this.ExecuteNamedCommand( 'CreateLink', "javascript:void(0);/*fckeditortemplink*/" ) ;
var oLinks = this.EditorDocument.links ;
--- 62,69 ----
{
if ( url.length == 0 )
! FCK.ExecuteNamedCommand( 'Unlink' ) ;
else
{
! FCK.ExecuteNamedCommand( 'CreateLink', "javascript:void(0);/*fckeditortemplink*/" ) ;
var oLinks = this.EditorDocument.links ;
***************
*** 98,102 ****
html = html.replace( re, "<div$2</div>" ) ;
! this.InsertHtml( html ) ;
}
--- 99,103 ----
html = html.replace( re, "<div$2</div>" ) ;
! FCK.InsertHtml( html ) ;
}
***************
*** 104,110 ****
{
var oWindow = window.open( '', null, 'toolbar=yes,location=yes,status=yes,menubar=yes,scrollbars=yes,resizable=yes' ) ;
oWindow.document.write( FCK.GetHTML() );
oWindow.document.close();
!
// TODO: The CSS of the editor area must be configurable.
// oWindow.document.createStyleSheet( config.EditorAreaCSS );
--- 105,112 ----
{
var oWindow = window.open( '', null, 'toolbar=yes,location=yes,status=yes,menubar=yes,scrollbars=yes,resizable=yes' ) ;
+
oWindow.document.write( FCK.GetHTML() );
oWindow.document.close();
!
// TODO: The CSS of the editor area must be configurable.
// oWindow.document.createStyleSheet( config.EditorAreaCSS );
Index: fck_2_gecko.js
===================================================================
RCS file: /cvsroot/phpslash/phpslash-dev/public_html/scripts/fckeditor/editor/_source/internals/fck_2_gecko.js,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** fck_2_gecko.js 28 Oct 2004 20:17:42 -0000 1.1
--- fck_2_gecko.js 30 Oct 2004 13:53:12 -0000 1.2
***************
*** 14,19 ****
* (Gecko specific implementations)
*
! * Version: 2.0 Beta 1
! * Modified: 2004-05-31 23:07:49
*
* File Authors:
--- 14,19 ----
* (Gecko specific implementations)
*
! * Version: 2.0 Beta 2
! * Modified: 2004-08-30 23:17:33
*
* File Authors:
***************
*** 41,45 ****
{
case 'Print' :
! FCK.EditorWindow.print();
default :
FCK._BaseExecuteNamedCommand( commandName, commandParameter ) ;
--- 41,58 ----
{
case 'Print' :
! FCK.EditorWindow.print() ;
! break ;
! case 'Paste' :
! try { if ( FCK.Paste() ) FCK._BaseExecuteNamedCommand( 'Paste' ) ; }
! catch (e) { alert( "Your browser security settings don't permit the editor to automaticaly execute pasting operations. Please use the keyboard for that (Ctrl+V)." ) ; }
! break ;
! case 'Cut' :
! try { FCK._BaseExecuteNamedCommand( 'Cut' ) ; }
! catch (e) { alert( "Your browser security settings don't permit the editor to automaticaly execute cutting operations. Please use the keyboard for that (Ctrl+X)." ) ; }
! break ;
! case 'Copy' :
! try { FCK._BaseExecuteNamedCommand( 'Copy' ) ; }
! catch (e) { alert( "Your browser security settings don't permit the editor to automaticaly execute copying operations. Please use the keyboard for that (Ctrl+C)." ) ; }
! break ;
default :
FCK._BaseExecuteNamedCommand( commandName, commandParameter ) ;
***************
*** 47,55 ****
}
- FCK.Focus = function()
- {
- this.EditorWindow.focus() ;
- }
-
FCK.AttachToOnSelectionChange = function( functionPointer )
{
--- 60,63 ----
***************
*** 59,64 ****
FCK.Paste = function()
{
- FCKDebug.Output( 'FCK.Paste' ) ;
-
if ( FCKConfig.ForcePasteAsPlainText )
{
--- 67,70 ----
***************
*** 141,149 ****
FCK.PasteAsPlainText = function()
{
/*
var sText = FCKTools.HTMLEncode( clipboardData.getData("Text") ) ;
-
- FCKDebug.Output( 'FCK.PasteAsPlainText: ' + sText ) ;
-
sText = sText.replace( /\n/g, '<BR>' ) ;
this.InsertHtml( sText ) ;
--- 147,156 ----
FCK.PasteAsPlainText = function()
{
+ // TODO: Implement the "Paste as Plain Text" code.
+
+ FCKDialog.OpenDialog( 'FCKDialog_Paste', 'Paste as Plain Text', 'dialog/fck_paste.html', 400, 330, 'PlainText' ) ;
+
/*
var sText = FCKTools.HTMLEncode( clipboardData.getData("Text") ) ;
sText = sText.replace( /\n/g, '<BR>' ) ;
this.InsertHtml( sText ) ;
***************
*** 151,154 ****
--- 158,170 ----
}
+ FCK.PasteFromWord = function()
+ {
+ // TODO: Implement the "Paste as Plain Text" code.
+
+ FCKDialog.OpenDialog( 'FCKDialog_Paste', 'Paste from Word', 'dialog/fck_paste.html', 400, 330, 'Word' ) ;
+
+ // FCK.CleanAndPaste( FCK.GetClipboardHTML() ) ;
+ }
+
FCK.GetClipboardHTML = function()
{
Index: fck_2_ie.js
===================================================================
RCS file: /cvsroot/phpslash/phpslash-dev/public_html/scripts/fckeditor/editor/_source/internals/fck_2_ie.js,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** fck_2_ie.js 28 Oct 2004 20:17:42 -0000 1.1
--- fck_2_ie.js 30 Oct 2004 13:53:12 -0000 1.2
***************
*** 14,19 ****
* (IE specific implementations)
*
! * Version: 2.0 Beta 1
! * Modified: 2004-05-31 23:07:49
*
* File Authors:
--- 14,19 ----
* (IE specific implementations)
*
! * Version: 2.0 Beta 2
! * Modified: 2004-09-02 11:40:29
*
* File Authors:
***************
*** 23,27 ****
FCK.Paste = function()
{
-
if ( FCKConfig.ForcePasteAsPlainText )
{
--- 23,26 ----
***************
*** 48,69 ****
FCK.PasteAsPlainText = function()
{
var sText = FCKTools.HTMLEncode( clipboardData.getData("Text") ) ;
! FCKDebug.Output( 'FCK.PasteAsPlainText: ' + sText ) ;
!
sText = sText.replace( /\n/g, '<BR>' ) ;
this.InsertHtml( sText ) ;
}
FCK.InsertHtml = function( html )
{
var oSel = FCKSelection.Delete() ;
oSel.createRange().pasteHTML( html ) ;
! this.Focus() ;
}
FCK.InsertElement = function( element )
{
! this.InsertHtml( element.outerHTML ) ;
}
--- 47,76 ----
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 <BR>
sText = sText.replace( /\n/g, '<BR>' ) ;
+
+ // Insert the resulting data in the editor.
this.InsertHtml( sText ) ;
}
+ FCK.PasteFromWord = function()
+ {
+ FCK.CleanAndPaste( FCK.GetClipboardHTML() ) ;
+ }
+
FCK.InsertHtml = function( html )
{
+ FCK.Focus() ;
var oSel = FCKSelection.Delete() ;
oSel.createRange().pasteHTML( html ) ;
!
}
FCK.InsertElement = function( element )
{
! FCK.InsertHtml( element.outerHTML ) ;
}
***************
*** 75,80 ****
{
var oDiv = document.createElement( 'DIV' ) ;
! divEdit.id = '___FCKHiddenDiv' ;
! oDiv.style.display = 'none' ;
oDiv.style.visibility = 'hidden' ;
oDiv.style.overflow = 'hidden' ;
--- 82,86 ----
{
var oDiv = document.createElement( 'DIV' ) ;
! oDiv.id = '___FCKHiddenDiv' ;
oDiv.style.visibility = 'hidden' ;
oDiv.style.overflow = 'hidden' ;
***************
*** 84,92 ****
document.body.appendChild( oDiv ) ;
-
- // Get the element again (must be done to work)
- oDiv = document.getElementById( '___FCKHiddenDiv' ) ;
}
var oTextRange = document.body.createTextRange() ;
oTextRange.moveToElementText( oDiv ) ;
--- 90,97 ----
document.body.appendChild( oDiv ) ;
}
+ oDiv.innerHTML = '' ;
+
var oTextRange = document.body.createTextRange() ;
oTextRange.moveToElementText( oDiv ) ;
***************
*** 101,105 ****
FCK.AttachToOnSelectionChange = function( functionPointer )
{
! this.EditorDocument.attachEvent( 'onselectionchange', functionPointer ) ;
}
--- 106,110 ----
FCK.AttachToOnSelectionChange = function( functionPointer )
{
! FCK.EditorDocument.attachEvent( 'onselectionchange', functionPointer ) ;
}
Index: fck_last.js
===================================================================
RCS file: /cvsroot/phpslash/phpslash-dev/public_html/scripts/fckeditor/editor/_source/internals/fck_last.js,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** fck_last.js 28 Oct 2004 20:17:42 -0000 1.1
--- fck_last.js 30 Oct 2004 13:53:12 -0000 1.2
***************
*** 12,16 ****
* These are the last script lines executed in the editor loading process.
*
! * Version: 2.0 Beta 1
* Modified: 2004-05-31 23:07:49
*
--- 12,16 ----
* These are the last script lines executed in the editor loading process.
*
! * Version: 2.0 Beta 2
* Modified: 2004-05-31 23:07:49
*
Index: fck_onload.js
===================================================================
RCS file: /cvsroot/phpslash/phpslash-dev/public_html/scripts/fckeditor/editor/_source/internals/fck_onload.js,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** fck_onload.js 28 Oct 2004 20:17:42 -0000 1.1
--- fck_onload.js 30 Oct 2004 13:53:12 -0000 1.2
***************
*** 13,18 ****
* its IFRAME. It's the editor startup.
*
! * Version: 2.0 Beta 1
! * Modified: 2004-05-31 23:07:49
*
* File Authors:
--- 13,18 ----
* its IFRAME. It's the editor startup.
*
! * Version: 2.0 Beta 2
! * Modified: 2004-09-10 01:48:31
*
* File Authors:
***************
*** 71,74 ****
--- 71,85 ----
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()
{
***************
*** 83,90 ****
}
!
! if ( FCKBrowserInfo.IsIE )
! FCKScriptLoader.AddScript( 'js/fckeditorcode_ie_1.js' ) ;
! else
! FCKScriptLoader.AddScript( 'js/fckeditorcode_gecko_1.js' ) ;
! }
--- 94,97 ----
}
! FCKScriptLoader.AddScript( 'lang/' + FCKLanguageManager.ActiveLanguage.Code + '.js' ) ;
! }
\ No newline at end of file
Index: fckbrowserinfo.js
===================================================================
RCS file: /cvsroot/phpslash/phpslash-dev/public_html/scripts/fckeditor/editor/_source/internals/fckbrowserinfo.js,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** fckbrowserinfo.js 28 Oct 2004 20:17:42 -0000 1.1
--- fckbrowserinfo.js 30 Oct 2004 13:53:12 -0000 1.2
***************
*** 12,16 ****
* Defines the FCKBrowserInfo object that hold some browser informations.
*
! * Version: 2.0 Beta 1
* Modified: 2004-05-31 23:07:49
*
--- 12,16 ----
* Defines the FCKBrowserInfo object that hold some browser informations.
*
! * Version: 2.0 Beta 2
* Modified: 2004-05-31 23:07:49
*
Index: fckcommands.js
===================================================================
RCS file: /cvsroot/phpslash/phpslash-dev/public_html/scripts/fckeditor/editor/_source/internals/fckcommands.js,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** fckcommands.js 28 Oct 2004 20:17:42 -0000 1.1
--- fckcommands.js 30 Oct 2004 13:53:12 -0000 1.2
***************
*** 12,17 ****
* Define all commands available in the editor.
*
! * Version: 2.0 Beta 1
! * Modified: 2004-05-31 23:07:49
*
* File Authors:
--- 12,17 ----
* Define all commands available in the editor.
*
! * Version: 2.0 Beta 2
! * Modified: 2004-09-02 00:56:46
*
* File Authors:
***************
*** 57,60 ****
--- 57,75 ----
FCKCommands['NewPage'] = new FCKNewPageCommand() ;
+ FCKCommands['TextColor'] = new FCKTextColorCommand('ForeColor') ;
+ FCKCommands['BGColor'] = new FCKTextColorCommand('BackColor') ;
+
+ FCKCommands['PasteText'] = new FCKPastePlainTextCommand() ;
+ FCKCommands['PasteWord'] = new FCKPasteWordCommand() ;
+
+ FCKCommands['TableInsertRow'] = new FCKTableCommand('TableInsertRow') ;
+ FCKCommands['TableDeleteRows'] = new FCKTableCommand('TableDeleteRows') ;
+ FCKCommands['TableInsertColumn'] = new FCKTableCommand('TableInsertColumn') ;
+ FCKCommands['TableDeleteColumns'] = new FCKTableCommand('TableDeleteColumns') ;
+ FCKCommands['TableInsertCell'] = new FCKTableCommand('TableInsertCell') ;
+ FCKCommands['TableDeleteCells'] = new FCKTableCommand('TableDeleteCells') ;
+ FCKCommands['TableMergeCells'] = new FCKTableCommand('TableMergeCells') ;
+ FCKCommands['TableSplitCell'] = new FCKTableCommand('TableSplitCell') ;
+
// Generic Undefined command (usually used when a command is under development).
FCKCommands['Undefined'] = new FCKUndefinedCommand() ;
Index: fckconfig.js
===================================================================
RCS file: /cvsroot/phpslash/phpslash-dev/public_html/scripts/fckeditor/editor/_source/internals/fckconfig.js,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** fckconfig.js 28 Oct 2004 20:17:42 -0000 1.1
--- fckconfig.js 30 Oct 2004 13:53:12 -0000 1.2
***************
*** 12,16 ****
* Creates and initializes the FCKConfig object.
*
! * Version: 2.0 Beta 1
* Modified: 2004-05-31 23:07:49
*
--- 12,16 ----
* Creates and initializes the FCKConfig object.
*
! * Version: 2.0 Beta 2
* Modified: 2004-05-31 23:07:49
*
Index: fckcontextmenu.js
===================================================================
RCS file: /cvsroot/phpslash/phpslash-dev/public_html/scripts/fckeditor/editor/_source/internals/fckcontextmenu.js,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** fckcontextmenu.js 28 Oct 2004 20:17:42 -0000 1.1
--- fckcontextmenu.js 30 Oct 2004 13:53:12 -0000 1.2
***************
*** 13,18 ****
* Context Menu operations.
*
! * Version: 2.0 Beta 1
! * Modified: 2004-05-31 23:07:49
*
* File Authors:
--- 13,18 ----
* Context Menu operations.
*
! * Version: 2.0 Beta 2
! * Modified: 2004-09-07 01:01:03
*
* File Authors:
***************
*** 69,84 ****
{
Add( new FCKContextMenuSeparator() ) ;
! Add( new FCKContextMenuItem( this, 'Undefined', FCKLang["InsertRow"] ) ) ;
! Add( new FCKContextMenuItem( this, 'Undefined', FCKLang["DeleteRows"] ) ) ;
Add( new FCKContextMenuSeparator() ) ;
! Add( new FCKContextMenuItem( this, 'Undefined', FCKLang["InsertColumn"] ) ) ;
! Add( new FCKContextMenuItem( this, 'Undefined', FCKLang["DeleteColumns"] ) ) ;
Add( new FCKContextMenuSeparator() ) ;
! Add( new FCKContextMenuItem( this, 'Undefined', FCKLang["InsertCell"] ) ) ;
! Add( new FCKContextMenuItem( this, 'Undefined', FCKLang["DeleteCells"] ) ) ;
! Add( new FCKContextMenuItem( this, 'Undefined', FCKLang["MergeCells"] ) ) ;
! Add( new FCKContextMenuItem( this, 'Undefined', FCKLang["SplitCell"] ) ) ;
Add( new FCKContextMenuSeparator() ) ;
! Add( new FCKContextMenuItem( this, 'Undefined', FCKLang["CellProperties"] ) ) ;
Add( new FCKContextMenuItem( this, 'TableProp', FCKLang["TableProperties"], true ) ) ;
}
--- 69,84 ----
{
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, 'Undefined', FCKLang["CellProperties"] ) ) ;
Add( new FCKContextMenuItem( this, 'TableProp', FCKLang["TableProperties"], true ) ) ;
}
***************
*** 97,102 ****
{
Add( new FCKContextMenuSeparator() ) ;
! Add( new FCKContextMenuItem( this, 'Undefined', FCKLang["ImageProperties"] ) ) ;
! // Add( new FCKContextMenuItem( this, 'Image', FCKLang["ImageProperties"], true ) ) ;
}
--- 97,101 ----
{
Add( new FCKContextMenuSeparator() ) ;
! Add( new FCKContextMenuItem( this, 'Image', FCKLang["ImageProperties"], true ) ) ;
}
***************
*** 134,143 ****
if ( oTag )
{
! sTagName = oTag.tagName.toUpperCase() ;
}
// Set items visibility.
this.Groups['Link'].SetVisible( FCK.GetNamedCommandState( 'Unlink' ) != FCK_TRISTATE_DISABLED ) ;
! this.Groups['TableCell'].SetVisible( FCKSelection.HasAncestorNode('TD') ) ; // TODO: Table Cell operations are not yet available.
this.Groups['Table'].SetVisible( sTagName == 'TABLE' ) ;
this.Groups['Image'].SetVisible( sTagName == 'IMG' ) ;
--- 133,142 ----
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' ) ;
Index: fckcontextmenu_gecko.js
===================================================================
RCS file: /cvsroot/phpslash/phpslash-dev/public_html/scripts/fckeditor/editor/_source/internals/fckcontextmenu_gecko.js,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** fckcontextmenu_gecko.js 28 Oct 2004 20:17:42 -0000 1.1
--- fckcontextmenu_gecko.js 30 Oct 2004 13:53:12 -0000 1.2
***************
*** 12,17 ****
* Context Menu operations. (Gecko specific implementations)
*
! * Version: 2.0 Beta 1
! * Modified: 2004-05-31 23:07:49
*
* File Authors:
--- 12,17 ----
* Context Menu operations. (Gecko specific implementations)
*
! * Version: 2.0 Beta 2
! * Modified: 2004-08-27 16:58:07
*
* File Authors:
***************
*** 38,55 ****
this.RefreshState() ;
! // The x and y parameters for Gecko are relative to the client
! var oFrames = [ FCK.EditorWindow.frameElement, window.frameElement ] ;
! for ( var i = 0 ; i < oFrames.length ; i++ )
! {
! var oParent = oFrames[i] ;
! while ( oParent )
! {
! x += oParent.offsetLeft ;
! y += oParent.offsetTop ;
!
! oParent = oParent.offsetParent ;
! }
! }
// Verifies if the context menu is completely visible.
--- 38,48 ----
this.RefreshState() ;
+
+ // Get the editor area and editor frames positions.
+ var oCoordsA = FCKTools.GetElementPosition( FCK.EditorWindow.frameElement ) ;
+ var oCoordsB = FCKTools.GetElementPosition( window.frameElement ) ;
! x += oCoordsA.X + oCoordsB.X ;
! y += oCoordsA.Y + oCoordsB.Y ;
// Verifies if the context menu is completely visible.
Index: fckcontextmenu_ie.js
===================================================================
RCS file: /cvsroot/phpslash/phpslash-dev/public_html/scripts/fckeditor/editor/_source/internals/fckcontextmenu_ie.js,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** fckcontextmenu_ie.js 28 Oct 2004 20:17:42 -0000 1.1
--- fckcontextmenu_ie.js 30 Oct 2004 13:53:12 -0000 1.2
***************
*** 12,17 ****
* Context Menu operations. (IE specific implementations)
*
! * Version: 2.0 Beta 1
! * Modified: 2004-05-31 23:07:49
*
* File Authors:
--- 12,17 ----
* Context Menu operations. (IE specific implementations)
*
! * Version: 2.0 Beta 2
! * Modified: 2004-08-20 22:58:12
*
* File Authors:
***************
*** 38,44 ****
this.RefreshState() ;
! // IE doenst get the offsetWidth and offsetHeight values if the element is not visible.
// So a temporary element is created to get this for us.
if ( !this._DivCopy )
{
--- 38,49 ----
this.RefreshState() ;
+
+ // IE doens't get the offsetWidth and offsetHeight values if the element is not visible.
+ // So the Popup must be "shown" with no size to be able to get these values.
+ this._Popup.show( x, y, 0, 0 ) ;
! // This was the previous solution. It works well to.
// So a temporary element is created to get this for us.
+ /*
if ( !this._DivCopy )
{
***************
*** 51,57 ****
this._DivCopy.innerHTML = this._Div.innerHTML ;
// Show the Popup at the specified location.
! this._Popup.show( x, y, this._DivCopy.offsetWidth, this._DivCopy.offsetHeight ) ;
}
--- 56,63 ----
this._DivCopy.innerHTML = this._Div.innerHTML ;
+ */
// Show the Popup at the specified location.
! this._Popup.show( x, y, this._Div.offsetWidth, this._Div.offsetHeight ) ;
}
Index: fckdebug.js
===================================================================
RCS file: /cvsroot/phpslash/phpslash-dev/public_html/scripts/fckeditor/editor/_source/internals/fckdebug.js,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** fckdebug.js 28 Oct 2004 20:17:42 -0000 1.1
--- fckdebug.js 30 Oct 2004 13:53:12 -0000 1.2
***************
*** 12,16 ****
* Debug window control and operations.
*
! * Version: 2.0 Beta 1
* Modified: 2004-05-31 23:07:49
*
--- 12,16 ----
* Debug window control and operations.
*
! * Version: 2.0 Beta 2
* Modified: 2004-05-31 23:07:49
*
Index: fckdialog.js
===================================================================
RCS file: /cvsroot/phpslash/phpslash-dev/public_html/scripts/fckeditor/editor/_source/internals/fckdialog.js,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** fckdialog.js 28 Oct 2004 20:17:42 -0000 1.1
--- fckdialog.js 30 Oct 2004 13:53:12 -0000 1.2
***************
*** 12,17 ****
* Dialog windows operations.
*
! * Version: 2.0 Beta 1
! * Modified: 2004-05-31 23:07:50
*
* File Authors:
--- 12,17 ----
* Dialog windows operations.
*
! * Version: 2.0 Beta 2
! * Modified: 2004-08-20 01:46:34
*
* File Authors:
***************
*** 22,26 ****
// This method opens a dialog window using the standard dialog template.
! FCKDialog.OpenDialog = function( dialogName, dialogTitle, dialogPage, width, height )
{
// Setup the dialog info.
--- 22,26 ----
// This method opens a dialog window using the standard dialog template.
! FCKDialog.OpenDialog = function( dialogName, dialogTitle, dialogPage, width, height, customValue )
{
// Setup the dialog info.
***************
*** 29,32 ****
--- 29,33 ----
oDialogInfo.Page = dialogPage ;
oDialogInfo.Editor = window ;
+ oDialogInfo.CustomValue = customValue ; // Optional
var sUrl = FCKConfig.BasePath + 'fckdialog.html' ;
Index: fckdialog_gecko.js
===================================================================
RCS file: /cvsroot/phpslash/phpslash-dev/public_html/scripts/fckeditor/editor/_source/internals/fckdialog_gecko.js,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** fckdialog_gecko.js 28 Oct 2004 20:17:42 -0000 1.1
--- fckdialog_gecko.js 30 Oct 2004 13:53:12 -0000 1.2
***************
*** 12,16 ****
* Dialog windows operations. (Gecko specific implementations)
*
! * Version: 2.0 Beta 1
* Modified: 2004-05-31 23:07:50
*
--- 12,16 ----
* Dialog windows operations. (Gecko specific implementations)
*
! * Version: 2.0 Beta 2
* Modified: 2004-05-31 23:07:50
*
Index: fckdialog_ie.js
===================================================================
RCS file: /cvsroot/phpslash/phpslash-dev/public_html/scripts/fckeditor/editor/_source/internals/fckdialog_ie.js,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** fckdialog_ie.js 28 Oct 2004 20:17:42 -0000 1.1
--- fckdialog_ie.js 30 Oct 2004 13:53:12 -0000 1.2
***************
*** 12,16 ****
* Dialog windows operations. (IE specific implementations)
*
! * Version: 2.0 Beta 1
* Modified: 2004-05-31 23:07:50
*
--- 12,16 ----
* Dialog windows operations. (IE specific implementations)
*
! * Version: 2.0 Beta 2
* Modified: 2004-05-31 23:07:50
*
Index: fcklanguagemanager.js
===================================================================
RCS file: /cvsroot/phpslash/phpslash-dev/public_html/scripts/fckeditor/editor/_source/internals/fcklanguagemanager.js,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** fcklanguagemanager.js 28 Oct 2004 20:17:42 -0000 1.1
--- fcklanguagemanager.js 30 Oct 2004 13:53:12 -0000 1.2
***************
*** 13,18 ****
* operations.
*
! * Version: 2.0 Beta 1
! * Modified: 2004-05-31 23:07:50
*
* File Authors:
--- 13,18 ----
* operations.
*
! * Version: 2.0 Beta 2
! * Modified: 2004-09-10 01:48:58
*
* File Authors:
***************
*** 85,87 ****
! FCKScriptLoader.AddScript( 'lang/' + FCKLanguageManager.ActiveLanguage.Code + '.js' ) ;
\ No newline at end of file
--- 85,88 ----
! // Load the language file and start the editor.
! LoadLanguageFile() ;
\ No newline at end of file
Index: fckscriptloader.js
===================================================================
RCS file: /cvsroot/phpslash/phpslash-dev/public_html/scripts/fckeditor/editor/_source/internals/fckscriptloader.js,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** fckscriptloader.js 28 Oct 2004 20:17:42 -0000 1.1
--- fckscriptloader.js 30 Oct 2004 13:53:12 -0000 1.2
***************
*** 13,17 ****
* scripts in the editor.
*
! * Version: 2.0 Beta 1
* Modified: 2004-05-31 23:07:50
*
--- 13,17 ----
* scripts in the editor.
*
! * Version: 2.0 Beta 2
* Modified: 2004-05-31 23:07:50
*
Index: fckselection.js
===================================================================
RCS file: /cvsroot/phpslash/phpslash-dev/public_html/scripts/fckeditor/editor/_source/internals/fckselection.js,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** fckselection.js 28 Oct 2004 20:17:42 -0000 1.1
--- fckselection.js 30 Oct 2004 13:53:12 -0000 1.2
***************
*** 12,16 ****
* Active selection functions.
*
! * Version: 2.0 Beta 1
* Modified: 2004-05-31 23:07:50
*
--- 12,16 ----
* Active selection functions.
*
! * Version: 2.0 Beta 2
* Modified: 2004-05-31 23:07:50
*
Index: fckselection_gecko.js
===================================================================
RCS file: /cvsroot/phpslash/phpslash-dev/public_html/scripts/fckeditor/editor/_source/internals/fckselection_gecko.js,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** fckselection_gecko.js 28 Oct 2004 20:17:43 -0000 1.1
--- fckselection_gecko.js 30 Oct 2004 13:53:12 -0000 1.2
***************
*** 12,17 ****
* Active selection functions. (Gecko specific implementation)
*
! * Version: 2.0 Beta 1
! * Modified: 2004-05-31 23:07:50
*
* File Authors:
--- 12,17 ----
* Active selection functions. (Gecko specific implementation)
*
! * Version: 2.0 Beta 2
! * Modified: 2004-09-02 01:13:50
*
* File Authors:
***************
*** 39,52 ****
{
if ( i == 0 )
- {
oSel.getRangeAt(i).selectNodeContents( node ) ;
- }
else
- {
oSel.removeRange( oSel.getRangeAt(i) ) ;
- }
}
}
FCKSelection.HasAncestorNode = function( nodeTagName )
{
--- 39,49 ----
{
if ( i == 0 )
oSel.getRangeAt(i).selectNodeContents( node ) ;
else
oSel.removeRange( oSel.getRangeAt(i) ) ;
}
}
+ // The "nodeTagName" parameter must be Upper Case.
FCKSelection.HasAncestorNode = function( nodeTagName )
{
***************
*** 57,61 ****
catch(e){}
}
!
while ( oContainer )
{
--- 54,58 ----
catch(e){}
}
!
while ( oContainer )
{
***************
*** 67,70 ****
--- 64,68 ----
}
+ // The "nodeTagName" parameter must be Upper Case.
FCKSelection.MoveToAncestorNode = function( nodeTagName )
{
***************
*** 73,80 ****
var oContainer = this.GetSelectedElement() ;
if ( ! oContainer )
- {
oContainer = FCK.EditorWindow.getSelection().getRangeAt(0).startContainer ;
! }
!
while ( oContainer )
{
--- 71,76 ----
var oContainer = this.GetSelectedElement() ;
if ( ! oContainer )
oContainer = FCK.EditorWindow.getSelection().getRangeAt(0).startContainer ;
!
while ( oContainer )
{
Index: fckselection_ie.js
===================================================================
RCS file: /cvsroot/phpslash/phpslash-dev/public_html/scripts/fckeditor/editor/_source/internals/fckselection_ie.js,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** fckselection_ie.js 28 Oct 2004 20:17:43 -0000 1.1
--- fckselection_ie.js 30 Oct 2004 13:53:12 -0000 1.2
***************
*** 12,17 ****
* Active selection functions. (IE specific implementation)
*
! * Version: 2.0 Beta 1
! * Modified: 2004-05-31 23:07:50
*
* File Authors:
--- 12,17 ----
* Active selection functions. (IE specific implementation)
*
! * Version: 2.0 Beta 2
! * Modified: 2004-09-02 01:13:51
*
* File Authors:
***************
*** 38,41 ****
--- 38,42 ----
}
+ // The "nodeTagName" parameter must be Upper Case.
FCKSelection.HasAncestorNode = function( nodeTagName )
{
***************
*** 61,64 ****
--- 62,66 ----
}
+ // The "nodeTagName" parameter must be Upper Case.
FCKSelection.MoveToAncestorNode = function( nodeTagName )
{
Index: fcktoolbaritems.js
===================================================================
RCS file: /cvsroot/phpslash/phpslash-dev/public_html/scripts/fckeditor/editor/_source/internals/fcktoolbaritems.js,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** fcktoolbaritems.js 28 Oct 2004 20:17:43 -0000 1.1
--- fcktoolbaritems.js 30 Oct 2004 13:53:12 -0000 1.2
***************
*** 12,17 ****
* Toolbar items definitions.
*
! * Version: 2.0 Beta 1
! * Modified: 2004-05-31 23:07:50
*
* File Authors:
--- 12,17 ----
* Toolbar items definitions.
*
! * Version: 2.0 Beta 2
! * Modified: 2004-08-30 23:24:31
*
* File Authors:
***************
*** 30,33 ****
--- 30,35 ----
FCKToolbarItems['Copy'] = new FCKToolbarButton( 'Copy', FCKLang.Copy, null, null, true ) ;
FCKToolbarItems['Paste'] = new FCKToolbarButton( 'Paste', FCKLang.Paste, null, null, true ) ;
+ FCKToolbarItems['PasteText'] = new FCKToolbarButton( 'PasteText', FCKLang.PasteText ) ;
+ FCKToolbarItems['PasteWord'] = new FCKToolbarButton( 'PasteWord', FCKLang.PasteWord ) ;
FCKToolbarItems['Print'] = new FCKToolbarButton( 'Print', null, null, null, true ) ;
FCKToolbarItems['Undo'] = new FCKToolbarButton( 'Undo', null, null, null, true ) ;
***************
*** 68,69 ****
--- 70,74 ----
FCKToolbarItems['FontSize'] = new FCKToolbarCombo( 'FontSize', FCKLang['FontSize'], '1;2;3;4;5;6;7', 'xx-small;x-small;small;medium;large;x-large;xx-large' ) ;
FCKToolbarItems['FontFormat'] = new FCKToolbarCombo( 'FontFormat', FCKLang['FontFormat'], '<P>;<DIV>;<H1>;<H2>', 'Normal (P);Normal (DIV);Heading 1;Heading 2' ) ;
+
+ FCKToolbarItems['TextColor'] = new FCKToolbarPanelButton( 'TextColor' ) ;
+ FCKToolbarItems['BGColor'] = new FCKToolbarPanelButton( 'BGColor' ) ;
Index: fcktoolbarset.js
===================================================================
RCS file: /cvsroot/phpslash/phpslash-dev/public_html/scripts/fckeditor/editor/_source/internals/fcktoolbarset.js,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** fcktoolbarset.js 28 Oct 2004 20:17:43 -0000 1.1
--- fcktoolbarset.js 30 Oct 2004 13:53:12 -0000 1.2
***************
*** 13,17 ****
* toolbar.
*
! * Version: 2.0 Beta 1
* Modified: 2004-05-31 23:07:50
*
--- 13,17 ----
* toolbar.
*
! * Version: 2.0 Beta 2
* Modified: 2004-05-31 23:07:50
*
Index: fcktools.js
===================================================================
RCS file: /cvsroot/phpslash/phpslash-dev/public_html/scripts/fckeditor/editor/_source/internals/fcktools.js,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** fcktools.js 28 Oct 2004 20:17:43 -0000 1.1
--- fcktools.js 30 Oct 2004 13:53:12 -0000 1.2
***************
*** 12,17 ****
* Utility functions.
*
! * Version: 2.0 Beta 1
! * Modified: 2004-05-31 23:07:50
*
* File Authors:
--- 12,17 ----
* Utility functions.
*
! * Version: 2.0 Beta 2
! * Modified: 2004-09-02 02:11:14
*
* File Authors:
***************
*** 159,160 ****
--- 159,191 ----
}
+ FCKTools.GetElementPosition = function( el )
+ {
+ // Initializes the Coordinates object that will be returned by the function.
+ var c = { X:0, Y:0 } ;
+
+ // Loop throw the offset chain.
+ while ( el )
+ {
+ c.X += el.offsetLeft ;
+ c.Y += el.offsetTop ;
+
+ el = el.offsetParent ;
+ }
+
+ // Return the Coordinates object
+ return c ;
+ }
+
+ FCKTools.GetElementAscensor = function( element, ascensorTagName )
+ {
+ var e = element.parentNode ;
+
+ while ( e )
+ {
+ if ( e.nodeName == ascensorTagName )
+ return e ;
+
+ e = e.parentNode ;
+ }
+ }
+
Index: fcktools_gecko.js
===================================================================
RCS file: /cvsroot/phpslash/phpslash-dev/public_html/scripts/fckeditor/editor/_source/internals/fcktools_gecko.js,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** fcktools_gecko.js 28 Oct 2004 20:17:43 -0000 1.1
--- fcktools_gecko.js 30 Oct 2004 13:53:12 -0000 1.2
***************
*** 12,16 ****
* Utility functions. (Gecko version).
*
! * Version: 2.0 Beta 1
* Modified: 2004-05-31 23:07:50
*
--- 12,16 ----
* Utility functions. (Gecko version).
*
! * Version: 2.0 Beta 2
* Modified: 2004-05-31 23:07:50
*
Index: fcktools_ie.js
===================================================================
RCS file: /cvsroot/phpslash/phpslash-dev/public_html/scripts/fckeditor/editor/_source/internals/fcktools_ie.js,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** fcktools_ie.js 28 Oct 2004 20:17:43 -0000 1.1
--- fcktools_ie.js 30 Oct 2004 13:53:12 -0000 1.2
***************
*** 12,16 ****
* Utility functions. (IE version).
*
! * Version: 2.0 Beta 1
* Modified: 2004-05-31 23:07:50
*
--- 12,16 ----
* Utility functions. (IE version).
*
! * Version: 2.0 Beta 2
* Modified: 2004-05-31 23:07:50
*
Index: fckurlparams.js
===================================================================
RCS file: /cvsroot/phpslash/phpslash-dev/public_html/scripts/fckeditor/editor/_source/internals/fckurlparams.js,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** fckurlparams.js 28 Oct 2004 20:17:43 -0000 1.1
--- fckurlparams.js 30 Oct 2004 13:53:12 -0000 1.2
***************
*** 13,17 ****
* passed by the URL QueryString (after the "?").
*
! * Version: 2.0 Beta 1
* Modified: 2004-05-31 23:07:51
*
--- 13,17 ----
* passed by the URL QueryString (after the "?").
*
! * Version: 2.0 Beta 2
* Modified: 2004-05-31 23:07:51
*
Index: fckxhtml.js
===================================================================
RCS file: /cvsroot/phpslash/phpslash-dev/public_html/scripts/fckeditor/editor/_source/internals/fckxhtml.js,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** fckxhtml.js 28 Oct 2004 20:17:43 -0000 1.1
--- fckxhtml.js 30 Oct 2004 13:53:12 -0000 1.2
***************
*** 12,17 ****
* Defines the FCKXHtml object, responsible for the XHTML operations.
*
! * Version: 2.0 Beta 1
! * Modified: 2004-05-31 23:07:51
*
* File Authors:
--- 12,17 ----
* Defines the FCKXHtml object, responsible for the XHTML operations.
*
! * Version: 2.0 Beta 2
! * Modified: 2004-06-18 01:08:15
*
* File Authors:
***************
*** 27,36 ****
this.XML = new ActiveXObject( 'Msxml2.DOMDocument' ) ;
else // Gecko
- {
this.XML = document.implementation.createDocument( '', '', null ) ;
-
- // Gecko doesn't have the "xml" property for XML Nodes, so we must do it manually.
- Node.prototype.__defineGetter__( 'xml', FCKXHtml._Node_getXML ) ;
- }
// Add a root element that holds all child nodes.
--- 27,31 ----
***************
*** 39,45 ****
// Start recursivelly calling the _AppendNode function.
this._AppendChildNodes( this.MainNode, node ) ;
!
// Get the resulting XHTML as a string.
! var sXHTML = this.MainNode.xml ;
// Strip the "XHTML" root node.
--- 34,40 ----
// Start recursivelly calling the _AppendNode function.
this._AppendChildNodes( this.MainNode, node ) ;
!
// Get the resulting XHTML as a string.
! var sXHTML = document.all ? this.MainNode.xml : FCKXHtml._GetGeckoNodeXml( this.MainNode ) ;
// Strip the "XHTML" root node.
***************
*** 47,51 ****
}
! FCKXHtml._Node_getXML = function()
{
// Create the XMLSerializer.
--- 42,46 ----
}
! FCKXHtml._GetGeckoNodeXml = function( node )
{
// Create the XMLSerializer.
***************
*** 53,61 ****
// Return the serialized XML as a string.
! return oSerializer.serializeToString( this ) ;
}
FCKXHtml._AppendAttribute = function( xmlNode, attributeName, attributeValue )
{
// Create the attribute.
var oXmlAtt = this.XML.createAttribute( attributeName ) ;
--- 48,60 ----
// Return the serialized XML as a string.
! return oSerializer.serializeToString( node ) ;
}
FCKXHtml._AppendAttribute = function( xmlNode, attributeName, attributeValue )
{
+ // There is a bug in Mozilla that returns the '_moz_dirty' as specified.
+ if ( attributeName == '_moz_dirty' )
+ return ;
+
// Create the attribute.
var oXmlAtt = this.XML.createAttribute( attributeName ) ;
***************
*** 101,105 ****
var oAttribute = oAttributes[n] ;
if ( oAttribute.specified )
! this._AppendAttribute( oNode, oAttribute.nodeName.toLowerCase(), oAttribute.nodeValue ) ;
}
--- 100,114 ----
var oAttribute = oAttributes[n] ;
if ( oAttribute.specified )
! {
! var sAttName = oAttribute.nodeName.toLowerCase() ;
! var sAttValue = oAttribute.nodeValue ;
!
! // The following must be done because of a bug on IE regarding the style
! // attribute. It returns "null" for the nodeValue.
! if ( sAttName == 'style' && document.all )
! sAttValue = htmlNode.style.cssText ;
!
! this._AppendAttribute( oNode, sAttName, sAttValue ) ;
! }
}
|