Index: trunk/admin/editor/cmseditor/fckeditor.php =================================================================== --- trunk/admin/editor/cmseditor/fckeditor.php (revision 2001) +++ trunk/admin/editor/cmseditor/fckeditor.php (revision 2002) @@ -1,144 +1,143 @@ <?php /* * 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: fckeditor.php * This is the integration file for PHP. * * It defines the FCKeditor class that can be used to create editor * instances in PHP pages on server side. * * Version: 2.0 RC3 * Modified: 2005-03-02 12:38:37 * * File Authors: * Frederico Caldeira Knabben (fredck@fckeditor.net) */ class FCKeditor { var $InstanceName ; var $BasePath ; var $Width ; var $Height ; var $ToolbarSet ; var $Value ; var $Config ; function FCKeditor( $instanceName ) { $this->InstanceName = $instanceName ; $this->BasePath = '/FCKeditor/' ; $this->Width = '100%' ; - $this->Height = '200' ; + $this->Height = '100%' ; $this->ToolbarSet = 'Default' ; $this->Value = '' ; $this->Config = array() ; } function Create() { echo $this->CreateHtml() ; } function CreateHtml() { $HtmlValue = htmlspecialchars( $this->Value ) ; - $Html = '<div>' ; if ( $this->IsCompatible() ) { $Link = "{$this->BasePath}editor/fckeditor.html?InstanceName={$this->InstanceName}" ; if ( $this->ToolbarSet != '' ) $Link .= "&Toolbar={$this->ToolbarSet}" ; // Render the linked hidden field. $Html .= "<input type=\"hidden\" id=\"{$this->InstanceName}\" name=\"{$this->InstanceName}\" value=\"{$HtmlValue}\">" ; // Render the configurations hidden field. $Html .= "<input type=\"hidden\" id=\"{$this->InstanceName}___Config\" value=\"" . $this->GetConfigFieldString() . "\">" ; // Render the editor IFRAME. $Html .= "<iframe id=\"{$this->InstanceName}___Frame\" src=\"{$Link}\" width=\"{$this->Width}\" height=\"{$this->Height}\" frameborder=\"no\" scrolling=\"no\"></iframe>" ; } else { if ( strpos( $this->Width, '%' ) === false ) $WidthCSS = $this->Width . 'px' ; else $WidthCSS = $this->Width ; if ( strpos( $this->Height, '%' ) === false ) $HeightCSS = $this->Height . 'px' ; else $HeightCSS = $this->Height ; $Html .= "<textarea name=\"{$this->InstanceName}\" rows=\"4\" cols=\"40\" style=\"width: {$WidthCSS}; height: {$HeightCSS}\" wrap=\"virtual\">{$HtmlValue}</textarea>" ; } $Html .= '</div>' ; return $Html ; } function IsCompatible() { $sAgent = $_SERVER['HTTP_USER_AGENT'] ; if ( strpos($sAgent, 'MSIE') !== false && strpos($sAgent, 'mac') === false && strpos($sAgent, 'Opera') === false ) { $iVersion = (float)substr($sAgent, strpos($sAgent, 'MSIE') + 5, 3) ; return ($iVersion >= 5.5) ; } else if ( strpos($sAgent, 'Gecko') !== false ) { $iVersion = (int)substr($sAgent, strpos($sAgent, 'Gecko/') + 6, 8) ; return ($iVersion >= 20030210) ; } else return false ; } function GetConfigFieldString() { $sParams = '' ; $bFirst = true ; foreach ( $this->Config as $sKey => $sValue ) { if ( $bFirst == false ) $sParams .= '&' ; else $bFirst = false ; if ( $sValue === true ) $sParams .= $this->EncodeConfig( $sKey ) . '=true' ; else if ( $sValue === false ) $sParams .= $this->EncodeConfig( $sKey ) . '=false' ; else $sParams .= $this->EncodeConfig( $sKey ) . '=' . $this->EncodeConfig( $sValue ) ; } return $sParams ; } function EncodeConfig( $valueToEncode ) { $chars = array( '&' => '%26', '=' => '%3D', '"' => '%22' ) ; return strtr( $valueToEncode, $chars ) ; } } ?> \ No newline at end of file Property changes on: trunk/admin/editor/cmseditor/fckeditor.php ___________________________________________________________________ Modified: cvs2svn:cvs-rev ## -1 +1 ## -1.2 \ No newline at end of property +1.3 \ No newline at end of property Index: trunk/admin/editor/cmseditor/fckconfig.js =================================================================== --- trunk/admin/editor/cmseditor/fckconfig.js (revision 2001) +++ trunk/admin/editor/cmseditor/fckconfig.js (revision 2002) @@ -1,149 +1,149 @@ /* * Edited by Kostja * 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 * Editor configuration settings. * See the documentation for more info. * * Version: 2.0 RC3 * Modified: 2005-02-27 21:31:48 * * File Authors: * Frederico Caldeira Knabben (fredck@fckeditor.net) */ FCKConfig.CustomConfigurationsPath = '' ; FCKConfig.EditorAreaCSS = FCKConfig.BasePath + 'css/fck_editorarea.css' ; FCKConfig.BaseHref = '' ; FCKConfig.FullPage = false ; FCKConfig.Debug = false; FCKConfig.SkinPath = FCKConfig.BasePath + 'skins/default/' ; FCKConfig.PluginsPath = FCKConfig.BasePath + 'plugins/' ; // FCKConfig.Plugins.Add( 'placeholder', 'en,it' ) ; FCKConfig.AutoDetectLanguage = true ; FCKConfig.DefaultLanguage = 'en' ; FCKConfig.ContentLangDirection = 'ltr' ; FCKConfig.EnableXHTML = true ; FCKConfig.EnableSourceXHTML = true ; FCKConfig.FillEmptyBlocks = true ; FCKConfig.FormatSource = true ; FCKConfig.FormatOutput = true ; FCKConfig.FormatIndentator = ' ' ; FCKConfig.GeckoUseSPAN = true ; -FCKConfig.StartupFocus = false ; +FCKConfig.StartupFocus = true; FCKConfig.ForcePasteAsPlainText = true ; FCKConfig.ForceSimpleAmpersand = false ; FCKConfig.TabSpaces = 0; FCKConfig.ShowBorders = true; FCKConfig.ShowTableBorders = true; FCKConfig.UseBROnCarriageReturn = false ; FCKConfig.ToolbarStartExpanded = true ; FCKConfig.ToolbarCanCollapse = true ; FCKConfig.ProjectPath = FCKConfig.BasePath.replace(/\/cmseditor\/editor\/$/,''); FCKConfig.IconImagesUrl = FCKConfig.ProjectPath+'/templates/UserFiles/icons'; FCKConfig.ToolbarSets["Default"] = [ ['Cut','Copy','Paste','PasteText','PasteWord','NewPage','SelectAll','-','Link','Unlink','Anchor','-','Image','SpecialChar','-','Find','Replace','-','Rule'], ['Source'], '/', ['Bold','Italic','Underline','StrikeThrough','-','Subscript','Superscript','-','JustifyLeft','JustifyCenter','JustifyRight','JustifyFull','-','OrderedList','UnorderedList','Outdent','Indent'], '/', ['Style','RemoveFormat'] ] ; FCKConfig.ToolbarSets["Advanced"] = [ ['Cut','Copy','Paste','PasteText','PasteWord','-','NewPage','SelectAll','-','Find','Replace','-','Print','Preview','-','Link','Unlink','Anchor','Rule','-','Image','Document','Table','SpecialChar'], '/', ['Bold','Italic','Underline','StrikeThrough','-','JustifyLeft','JustifyCenter','JustifyRight','JustifyFull','-','OrderedList','UnorderedList','Outdent','Indent','-','Subscript','Superscript','-','TextColor','BGColor','-','Undo','Redo'], '/', ['Style','FontName','FontSize','RemoveFormat','-','SpellCheck','100%','|','Source'] ] ; FCKConfig.ToolbarSets["Advanced2"] = [ ['Cut','Copy','Paste','PasteText','PasteWord','-','NewPage','SelectAll','-','Find','Replace','-','Print','Preview','-','Link','Unlink','Anchor','Rule','-','Image','Document','Table','SpecialChar'], '/', ['Bold','Italic','Underline','StrikeThrough','-','JustifyLeft','JustifyCenter','JustifyRight','JustifyFull','-','OrderedList','UnorderedList','Outdent','Indent','-','Subscript','Superscript','-','TextColor','BGColor','-','Undo','Redo'], '/', ['FontName','FontSize','RemoveFormat','-','SpellCheck','100%','|','Source'] ] ; FCKConfig.ToolbarSets["FAQ"] = [ ['Cut','Copy','Paste','PasteText','PasteWord','-','NewPage','SelectAll','-','Find','Replace','-','Print','-','Link','Unlink','Anchor','Rule','-','Image','Document','Table','SpecialChar'], '/', ['Bold','Italic','Underline','StrikeThrough','-','JustifyLeft','JustifyCenter','JustifyRight','JustifyFull','-','OrderedList','UnorderedList','Outdent','Indent','-','Subscript','Superscript','-','TextColor','BGColor','-','Undo','Redo'], '/', ['Style','FontName','FontSize','RemoveFormat','-','SpellCheck','100%','|','Source'] ] ; FCKConfig.ToolbarSets["Basic"] = [ ['Bold','Italic','-','OrderedList','UnorderedList','-','Link','Unlink','-','About'] ] ; FCKConfig.ContextMenu = ['Generic','Link','Anchor','Image','Select','Document','Textarea','Checkbox','Radio','TextField','HiddenField','ImageButton','Button','BulletedList','NumberedList','TableCell','Table','Form'] ; FCKConfig.FontColors = '000000,993300,333300,003300,003366,000080,333399,333333,800000,FF6600,808000,808080,008080,0000FF,666699,808080,FF0000,FF9900,99CC00,339966,33CCCC,3366FF,800080,999999,FF00FF,FFCC00,FFFF00,00FF00,00FFFF,00CCFF,993366,C0C0C0,FF99CC,FFCC99,FFFF99,CCFFCC,CCFFFF,99CCFF,CC99FF,FFFFFF' ; FCKConfig.FontNames = 'Arial;Comic Sans MS;Courier New;Tahoma;Times New Roman;Verdana' ; FCKConfig.FontSizes = '1/xx-small;2/x-small;3/small;4/medium;5/large;6/x-large;7/xx-large' ; FCKConfig.FontFormats = 'p;div;pre;address;h1;h2;h3;h4;h5;h6' ; FCKConfig.StylesXmlPath = '../fckstyles.xml' ; FCKConfig.SpellChecker = 'ieSpell' ; // 'ieSpell' | 'SpellerPages' FCKConfig.IeSpellDownloadUrl = 'http://www.iespell.com/rel/ieSpellSetup211325.exe' ; FCKConfig.LinkBrowser = true ; FCKConfig.LinkBrowserURL = FCKConfig.BasePath + 'filemanager/browser/default/browser.html?Connector=connectors/php/connector.php&ServerPath='+FCKConfig.ProjectPath+'/templates/UserFiles/' ; FCKConfig.LinkBrowserWindowWidth = screen.width * 0.7 ; // 70% FCKConfig.LinkBrowserWindowHeight = screen.height * 0.7 ; // 70% FCKConfig.ImageBrowser = true ; FCKConfig.ImageBrowserURL = FCKConfig.BasePath + 'filemanager/browser/default/browser.html?Type=Images&Connector=connectors/php/connector.php&ServerPath='+FCKConfig.ProjectPath+'/templates/UserFiles/' ; FCKConfig.ImageBrowserWindowWidth = screen.width * 0.7 ; // 70% ; FCKConfig.ImageBrowserWindowHeight = screen.height * 0.7 ; // 70% ; FCKConfig.DocumentBrowser = true ; FCKConfig.DocumentBrowserURL = FCKConfig.BasePath + 'filemanager/browser/default/browser.html?Type=Documents&Connector=connectors/php/connector.php&ServerPath='+FCKConfig.ProjectPath+'/templates/UserFiles/' ; FCKConfig.ImageBrowserWindowWidth = screen.width * 0.7 ; // 70% ; FCKConfig.ImageBrowserWindowHeight = screen.height * 0.7 ; // 70% ; FCKConfig.DocumentsServerPath = FCKConfig.ProjectPath+'/templates/UserFiles/Documents' FCKConfig.StructureBrowser = true ; FCKConfig.StructureBrowserURL = FCKConfig.ProjectPath+'/admin/index.php?t=structure/tree' ; FCKConfig.StructureBrowserWindowWidth = screen.width * 0.5 ; // 50% FCKConfig.StructureBrowserWindowHeight = screen.height * 0.7 ; // 70% FCKConfig.FilesBrowserURL = FCKConfig.BasePath + 'filemanager/browser/default/browser.html?Type=Files&Connector=connectors/php/connector.php&ServerPath='+FCKConfig.ProjectPath+'/templates/UserFiles/' ; FCKConfig.SmileyPath = FCKConfig.BasePath + 'images/smiley/msn/' ; FCKConfig.SmileyImages = ['regular_smile.gif','sad_smile.gif','wink_smile.gif','teeth_smile.gif','confused_smile.gif','tounge_smile.gif','embaressed_smile.gif','omg_smile.gif','whatchutalkingabout_smile.gif','angry_smile.gif','angel_smile.gif','shades_smile.gif','devil_smile.gif','cry_smile.gif','lightbulb.gif','thumbs_down.gif','thumbs_up.gif','heart.gif','broken_heart.gif','kiss.gif','envelope.gif'] ; FCKConfig.SmileyColumns = 8 ; FCKConfig.SmileyWindowWidth = 320 ; FCKConfig.SmileyWindowHeight = 240 ; \ No newline at end of file Property changes on: trunk/admin/editor/cmseditor/fckconfig.js ___________________________________________________________________ Modified: cvs2svn:cvs-rev ## -1 +1 ## -1.8 \ No newline at end of property +1.9 \ No newline at end of property Index: trunk/admin/editor/cmseditor/fckeditor.js =================================================================== --- trunk/admin/editor/cmseditor/fckeditor.js (revision 2001) +++ trunk/admin/editor/cmseditor/fckeditor.js (revision 2002) @@ -1,173 +1,174 @@ /* * 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: fckeditor.js * This is the integration file for JavaScript. * * It defines the FCKeditor class that can be used to create editor * instances in a HTML page in the client side. For server side * operations, use the specific integration system. * * Version: 2.0 RC3 * Modified: 2005-02-27 19:04:39 * * File Authors: * Frederico Caldeira Knabben (fredck@fckeditor.net) */ // FCKeditor Class var FCKeditor = function( instanceName, width, height, toolbarSet, value ) { // Properties this.InstanceName = instanceName ; this.Width = width || '100%' ; - this.Height = height || '200' ; + this.Height = height || '100%' ; this.ToolbarSet = toolbarSet || 'Default' ; this.Value = value || '' ; this.BasePath = '/fckeditor/' ; this.CheckBrowser = true ; this.DisplayErrors = true ; //this.ProjectDir = ''; this.Config = new Object() ; // Events this.OnError = null ; // function( source, errorNumber, errorDescription ) } FCKeditor.prototype.Create = function() { // Check for errors if ( !this.InstanceName || this.InstanceName.length == 0 ) { this._ThrowError( 701, 'You must specify a instance name.' ) ; return ; } document.write( '<div>' ) ; if ( !this.CheckBrowser || this._IsCompatibleBrowser() ) { document.write( '<input type="hidden" id="' + this.InstanceName + '" name="' + this.InstanceName + '" value="' + this._HTMLEncode( this.Value ) + '">' ) ; document.write( this._GetConfigHtml() ) ; document.write( this._GetIFrameHtml() ) ; } else { var sWidth = this.Width.toString().indexOf('%') > 0 ? this.Width : this.Width + 'px' ; var sHeight = this.Height.toString().indexOf('%') > 0 ? this.Height : this.Height + 'px' ; document.write('<textarea name="' + this.InstanceName + '" rows="4" cols="40" style="WIDTH: ' + sWidth + '; HEIGHT: ' + sHeight + '" wrap="virtual">' + this._HTMLEncode( this.Value ) + '<\/textarea>') ; } document.write( '</div>' ) ; } FCKeditor.prototype.ReplaceTextarea = function() { if ( !this.CheckBrowser || this._IsCompatibleBrowser() ) { var oTextarea = document.getElementById( this.InstanceName ) ; if ( !oTextarea ) oTextarea = document.getElementsByName( this.InstanceName )[0] ; if ( !oTextarea || oTextarea.tagName != 'TEXTAREA' ) { alert( 'Error: The TEXTAREA id "' + this.InstanceName + '" was not found' ) ; return ; } oTextarea.style.display = 'none' ; this._InsertHtmlBefore( this._GetConfigHtml(), oTextarea ) ; this._InsertHtmlBefore( this._GetIFrameHtml(), oTextarea ) ; this.oTextarea = oTextarea; } } FCKeditor.prototype._InsertHtmlBefore = function( html, element ) { if ( element.insertAdjacentHTML ) // IE element.insertAdjacentHTML( 'beforeBegin', html ) ; else // Gecko { var oRange = document.createRange() ; oRange.setStartBefore( element ) ; var oFragment = oRange.createContextualFragment( html ); element.parentNode.insertBefore( oFragment, element ) ; } } FCKeditor.prototype._GetConfigHtml = function() { var sConfig = '' ; for ( var o in this.Config ) { if ( sConfig.length > 0 ) sConfig += '&' ; sConfig += escape(o) + '=' + escape( this.Config[o] ) ; } return '<input type="hidden" id="' + this.InstanceName + '___Config" value="' + sConfig + '">' ; } FCKeditor.prototype._GetIFrameHtml = function() { + var sLink = this.BasePath + 'editor/fckeditor.html?InstanceName=' + this.InstanceName ; if (this.ToolbarSet) sLink += '&Toolbar=' + this.ToolbarSet ; - return '<iframe id="' + this.InstanceName + '___Frame" src="' + sLink + '" width="' + this.Width + '" height="' + this.Height + '" frameborder="no" scrolling="no"></iframe>' ; + } FCKeditor.prototype._IsCompatibleBrowser = function() { var sAgent = navigator.userAgent.toLowerCase() ; // Internet Explorer if ( sAgent.indexOf("msie") != -1 && sAgent.indexOf("mac") == -1 && sAgent.indexOf("opera") == -1 ) { var sBrowserVersion = navigator.appVersion.match(/MSIE (.\..)/)[1] ; return ( sBrowserVersion >= 5.5 ) ; } // Gecko else if ( navigator.product == "Gecko" && navigator.productSub >= 20030210 ) return true ; else return false ; } FCKeditor.prototype._ThrowError = function( errorNumber, errorDescription ) { this.ErrorNumber = errorNumber ; this.ErrorDescription = errorDescription ; if ( this.DisplayErrors ) { document.write( '<div style="COLOR: #ff0000">' ) ; document.write( '[ FCKeditor Error ' + this.ErrorNumber + ': ' + this.ErrorDescription + ' ]' ) ; document.write( '</div>' ) ; } if ( typeof( this.OnError ) == 'function' ) this.OnError( this, errorNumber, errorDescription ) ; } FCKeditor.prototype._HTMLEncode = function( text ) { if ( typeof( text ) != "string" ) text = text.toString() ; //text = text.replace(/&/g, "&") ; text = text.replace(/"/g, """) ; text = text.replace(/</g, "<") ; text = text.replace(/>/g, ">") ; text = text.replace(/'/g, "'") ; //text = text.replace( /&lt;/g, "<" ) ; //text = text.replace( /&qt;/g, "&qt;" ) ; return text ; } \ No newline at end of file Property changes on: trunk/admin/editor/cmseditor/fckeditor.js ___________________________________________________________________ Modified: cvs2svn:cvs-rev ## -1 +1 ## -1.4 \ No newline at end of property +1.5 \ No newline at end of property Index: trunk/admin/editor/cmseditor/editor/fckeditor.html =================================================================== --- trunk/admin/editor/cmseditor/editor/fckeditor.html (revision 2001) +++ trunk/admin/editor/cmseditor/editor/fckeditor.html (revision 2002) @@ -1,75 +1,75 @@ <!-- * 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: fckeditor.original.html * Main page that holds the editor. * * Version: 2.0 RC3 * Modified: 2005-03-02 10:54:21 * * File Authors: * Frederico Caldeira Knabben (fredck@fckeditor.net) --> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html> <head> <title>FCKeditor</title> <meta name="vs_targetSchema" content="http://schemas.microsoft.com/intellisense/ie5"> <!-- @Packager.RemoveLine --> <meta name="robots" content="noindex, nofollow" /> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <script type="text/javascript" src="lang/fcklanguagemanager.js"></script> <!-- @Packager.RemoveLine <meta http-equiv="Cache-Control" content="public"> @Packager.RemoveLine --> <!-- @Packager.Remove.Start --> <script type="text/javascript" src="_source/internals/fckcoreextensions.js"></script> <script type="text/javascript" src="_source/globals/fck_constants.js"></script> <script type="text/javascript" src="_source/internals/fckbrowserinfo.js"></script> <script type="text/javascript" src="_source/internals/fckscriptloader.js"></script> <script type="text/javascript" src="_source/internals/fckurlparams.js"></script> <script type="text/javascript" src="_source/internals/fck.js"></script> <script type="text/javascript" src="_source/internals/fckconfig.js"></script> <script type="text/javascript" src="_source/globals/fckeditorapi.js"></script> <script type="text/javascript" src="_source/internals/fck_onload.js"></script> <!-- @Packager.Remove.End --> <!-- @Packager.RemoveLine <script type="text/javascript" src="js/fck_startup.js"></script> @Packager.RemoveLine --> </head> <body> - <table height="100%" width="100%" cellpadding="0" cellspacing="0" border="0" style="TABLE-LAYOUT: fixed"> + <table height="100%" width="100%" height=100% cellpadding="0" cellspacing="0" border="0" style="TABLE-LAYOUT: fixed"> <tr> <td unselectable="on" style="OVERFLOW: hidden"> <table width="100%" cellpadding="0" cellspacing="0" border="0"> <tr id="Collapsed" style="DISPLAY: none"> <td id="ExpandHandle" class="TB_Expand" unselectable="on" colspan="3" onclick="FCKToolbarSet.Expand();return false;"><img class="TB_ExpandImg" src="images/spacer.gif" width="8" height="4" unselectable="on"></td> </tr> <tr id="Expanded" style="DISPLAY: none"> <td id="CollapseHandle" style="DISPLAY: none" class="TB_Collapse" unselectable="on" valign="bottom" onclick="FCKToolbarSet.Collapse();return false;"><img class="TB_CollapseImg" src="images/spacer.gif" width="8" height="4" unselectable="on"></td> <td id="eToolbar" class="TB_ToolbarSet" unselectable="on"></td> <td width="1" style="BACKGROUND-COLOR: #696969"></td> </tr> </table> </td> </tr> <tr id="eWysiwyg"> <td id="eWysiwygCell" height="100%" valign="top"> <iframe id="eEditorArea" name="eEditorArea" height="100%" width="100%" frameborder="no" src="fckeditorarea.html"></iframe> </td> </tr> <tr id="eSource" style="DISPLAY: none"> <td class="Source" height="100%" valign="top"> <textarea id="eSourceField" dir="ltr" style="WIDTH: 100%; HEIGHT: 100%"></textarea> </td> </tr> </table> </body> </html> Property changes on: trunk/admin/editor/cmseditor/editor/fckeditor.html ___________________________________________________________________ Modified: cvs2svn:cvs-rev ## -1 +1 ## -1.8 \ No newline at end of property +1.9 \ No newline at end of property