code
stringlengths
1
2.01M
repo_name
stringlengths
3
62
path
stringlengths
1
267
language
stringclasses
231 values
license
stringclasses
13 values
size
int64
1
2.01M
#!/usr/bin/env perl ##### # FCKeditor - The text editor for Internet - http://www.fckeditor.net # Copyright (C) 2003-2009 Frederico Caldeira Knabben # # == BEGIN LICENSE == # # Licensed under the terms of any of the following licenses at your # choice: # # - GNU General Public License Version 2 or later (the "GPL") # http://www.gnu.org/licenses/gpl.html # # - GNU Lesser General Public License Version 2.1 or later (the "LGPL") # http://www.gnu.org/licenses/lgpl.html # # - Mozilla Public License Version 1.1 or later (the "MPL") # http://www.mozilla.org/MPL/MPL-1.1.html # # == END LICENSE == # # This is the File Manager Connector for Perl. ##### ## # ATTENTION: To enable this connector, look for the "SECURITY" comment in config.pl. ## ## START: Hack for Windows (Not important to understand the editor code... Perl specific). if(Windows_check()) { chdir(GetScriptPath($0)); } sub Windows_check { # IIS,PWS(NT/95) $www_server_os = $^O; # Win98 & NT(SP4) if($www_server_os eq "") { $www_server_os= $ENV{'OS'}; } # AnHTTPd/Omni/IIS if($ENV{'SERVER_SOFTWARE'} =~ /AnWeb|Omni|IIS\//i) { $www_server_os= 'win'; } # Win Apache if($ENV{'WINDIR'} ne "") { $www_server_os= 'win'; } if($www_server_os=~ /win/i) { return(1); } return(0); } sub GetScriptPath { local($path) = @_; if($path =~ /[\:\/\\]/) { $path =~ s/(.*?)[\/\\][^\/\\]+$/$1/; } else { $path = '.'; } $path; } ## END: Hack for IIS require 'util.pl'; require 'io.pl'; require 'basexml.pl'; require 'commands.pl'; require 'upload_fck.pl'; require 'config.pl'; &read_input(); &DoResponse(); sub DoResponse { if($FORM{'Command'} eq "" || $FORM{'Type'} eq "" || $FORM{'CurrentFolder'} eq "") { return ; } # Get the main request informaiton. $sCommand = &specialchar_cnv($FORM{'Command'}); $sResourceType = &specialchar_cnv($FORM{'Type'}); $sCurrentFolder = $FORM{'CurrentFolder'}; if ( !($sCommand =~ /^(FileUpload|GetFolders|GetFoldersAndFiles|CreateFolder)$/) ) { SendError( 1, "Command not allowed" ) ; } if ( !($sResourceType =~ /^(File|Image|Flash|Media)$/) ) { SendError( 1, "Invalid type specified" ) ; } # Check the current folder syntax (must begin and start with a slash). if(!($sCurrentFolder =~ /\/$/)) { $sCurrentFolder .= '/'; } if(!($sCurrentFolder =~ /^\//)) { $sCurrentFolder = '/' . $sCurrentFolder; } # Check for invalid folder paths (..) if ( $sCurrentFolder =~ /(?:\.\.|\\)/ ) { SendError( 102, "" ) ; } if ( $sCurrentFolder =~ /(\/\.)|[[:cntrl:]]|(\/\/)|(\\\\)|([\:\*\?\"\<\>\|])/ ) { SendError( 102, "" ) ; } # File Upload doesn't have to Return XML, so it must be intercepted before anything. if($sCommand eq 'FileUpload') { FileUpload($sResourceType,$sCurrentFolder); return ; } print << "_HTML_HEAD_"; Content-Type:text/xml; charset=utf-8 Pragma: no-cache Cache-Control: no-cache Expires: Thu, 01 Dec 1994 16:00:00 GMT _HTML_HEAD_ &CreateXmlHeader($sCommand,$sResourceType,$sCurrentFolder); # Execute the required command. if($sCommand eq 'GetFolders') { &GetFolders($sResourceType,$sCurrentFolder); } elsif($sCommand eq 'GetFoldersAndFiles') { &GetFoldersAndFiles($sResourceType,$sCurrentFolder); } elsif($sCommand eq 'CreateFolder') { &CreateFolder($sResourceType,$sCurrentFolder); } &CreateXmlFooter(); exit ; }
10npsite
trunk/guanli/system/fckeditor/editor/filemanager/connectors/perl/connector.cgi
Perl
asf20
3,441
/* * FCKeditor - The text editor for Internet - http://www.fckeditor.net * Copyright (C) 2003-2009 Frederico Caldeira Knabben * * == BEGIN LICENSE == * * Licensed under the terms of any of the following licenses at your * choice: * * - GNU General Public License Version 2 or later (the "GPL") * http://www.gnu.org/licenses/gpl.html * * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") * http://www.gnu.org/licenses/lgpl.html * * - Mozilla Public License Version 1.1 or later (the "MPL") * http://www.mozilla.org/MPL/MPL-1.1.html * * == END LICENSE == * * Common objects and functions shared by all pages that compose the * File Browser dialog window. */ // Automatically detect the correct document.domain (#1919). (function() { var d = document.domain ; while ( true ) { // Test if we can access a parent property. try { var test = window.top.opener.document.domain ; break ; } catch( e ) {} // Remove a domain part: www.mytest.example.com => mytest.example.com => example.com ... d = d.replace( /.*?(?:\.|$)/, '' ) ; if ( d.length == 0 ) break ; // It was not able to detect the domain. try { document.domain = d ; } catch (e) { break ; } } })() ; function AddSelectOption( selectElement, optionText, optionValue ) { var oOption = document.createElement("OPTION") ; oOption.text = optionText ; oOption.value = optionValue ; selectElement.options.add(oOption) ; return oOption ; } var oConnector = window.parent.oConnector ; var oIcons = window.parent.oIcons ; function StringBuilder( value ) { this._Strings = new Array( value || '' ) ; } StringBuilder.prototype.Append = function( value ) { if ( value ) this._Strings.push( value ) ; } StringBuilder.prototype.ToString = function() { return this._Strings.join( '' ) ; }
10npsite
trunk/guanli/system/fckeditor/editor/filemanager/browser/default/js/common.js
JavaScript
asf20
1,960
/* * FCKeditor - The text editor for Internet - http://www.fckeditor.net * Copyright (C) 2003-2009 Frederico Caldeira Knabben * * == BEGIN LICENSE == * * Licensed under the terms of any of the following licenses at your * choice: * * - GNU General Public License Version 2 or later (the "GPL") * http://www.gnu.org/licenses/gpl.html * * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") * http://www.gnu.org/licenses/lgpl.html * * - Mozilla Public License Version 1.1 or later (the "MPL") * http://www.mozilla.org/MPL/MPL-1.1.html * * == END LICENSE == * * Defines the FCKXml object that is used for XML data calls * and XML processing. * * This script is shared by almost all pages that compose the * File Browser frameset. */ var FCKXml = function() {} FCKXml.prototype.GetHttpRequest = function() { // Gecko / IE7 try { return new XMLHttpRequest(); } catch(e) {} // IE6 try { return new ActiveXObject( 'Msxml2.XMLHTTP' ) ; } catch(e) {} // IE5 try { return new ActiveXObject( 'Microsoft.XMLHTTP' ) ; } catch(e) {} return null ; } 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 ) { var oXml ; try { // this is the same test for an FF2 bug as in fckxml_gecko.js // but we've moved the responseXML assignment into the try{} // so we don't even have to check the return status codes. var test = oXmlHttp.responseXML.firstChild ; oXml = oXmlHttp.responseXML ; } catch ( e ) { try { oXml = (new DOMParser()).parseFromString( oXmlHttp.responseText, 'text/xml' ) ; } catch ( e ) {} } if ( !oXml || !oXml.firstChild || oXml.firstChild.nodeName == 'parsererror' ) { alert( 'The server didn\'t send back a proper XML response. Please contact your system administrator.\n\n' + 'XML request error: ' + oXmlHttp.statusText + ' (' + oXmlHttp.status + ')\n\n' + 'Requested URL:\n' + urlToCall + '\n\n' + 'Response text:\n' + oXmlHttp.responseText ) ; return ; } oFCKXml.DOMDocument = oXml ; asyncFunctionPointer( oFCKXml ) ; } } } oXmlHttp.send( null ) ; if ( ! bAsync ) { if ( oXmlHttp.status == 200 || oXmlHttp.status == 304 ) this.DOMDocument = oXmlHttp.responseXML ; else { alert( 'XML request error: ' + oXmlHttp.statusText + ' (' + oXmlHttp.status + ')' ) ; } } } FCKXml.prototype.SelectNodes = function( xpath ) { if ( navigator.userAgent.indexOf('MSIE') >= 0 ) // IE return this.DOMDocument.selectNodes( xpath ) ; else // Gecko { var aNodeArray = new Array(); var xPathResult = this.DOMDocument.evaluate( xpath, 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 ) { if ( navigator.userAgent.indexOf('MSIE') >= 0 ) // IE return this.DOMDocument.selectSingleNode( xpath ) ; else // Gecko { var xPathResult = this.DOMDocument.evaluate( xpath, this.DOMDocument, this.DOMDocument.createNSResolver(this.DOMDocument.documentElement), 9, null); if ( xPathResult && xPathResult.singleNodeValue ) return xPathResult.singleNodeValue ; else return null ; } }
10npsite
trunk/guanli/system/fckeditor/editor/filemanager/browser/default/js/fckxml.js
JavaScript
asf20
3,925
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <!-- * FCKeditor - The text editor for Internet - http://www.fckeditor.net * Copyright (C) 2003-2009 Frederico Caldeira Knabben * * == BEGIN LICENSE == * * Licensed under the terms of any of the following licenses at your * choice: * * - GNU General Public License Version 2 or later (the "GPL") * http://www.gnu.org/licenses/gpl.html * * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") * http://www.gnu.org/licenses/lgpl.html * * - Mozilla Public License Version 1.1 or later (the "MPL") * http://www.mozilla.org/MPL/MPL-1.1.html * * == END LICENSE == * * This page shows the actual folder path. --> <html> <head> <title>Folder path</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <link href="browser.css" type="text/css" rel="stylesheet"> <script type="text/javascript"> // Automatically detect the correct document.domain (#1919). (function() { var d = document.domain ; while ( true ) { // Test if we can access a parent property. try { var test = window.top.opener.document.domain ; break ; } catch( e ) {} // Remove a domain part: www.mytest.example.com => mytest.example.com => example.com ... d = d.replace( /.*?(?:\.|$)/, '' ) ; if ( d.length == 0 ) break ; // It was not able to detect the domain. try { document.domain = d ; } catch (e) { break ; } } })() ; function SetCurrentFolder( resourceType, folderPath ) { document.getElementById('tdName').innerHTML = folderPath ; } window.onload = function() { window.top.IsLoadedActualFolder = true ; } </script> </head> <body> <table class="fullHeight" cellSpacing="0" cellPadding="0" width="100%" border="0"> <tr> <td> <button style="WIDTH: 100%" type="button"> <table cellSpacing="0" cellPadding="0" width="100%" border="0"> <tr> <td><img height="32" alt="" src="images/FolderOpened32.gif" width="32"></td> <td>&nbsp;</td> <td id="tdName" width="100%" nowrap class="ActualFolder">/</td> <td>&nbsp;</td> <td><img height="8" src="images/ButtonArrow.gif" width="12" alt=""></td> <td>&nbsp;</td> </tr> </table> </button> </td> </tr> </table> </body> </html>
10npsite
trunk/guanli/system/fckeditor/editor/filemanager/browser/default/frmactualfolder.html
HTML
asf20
2,427
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <!-- * FCKeditor - The text editor for Internet - http://www.fckeditor.net * Copyright (C) 2003-2009 Frederico Caldeira Knabben * * == BEGIN LICENSE == * * Licensed under the terms of any of the following licenses at your * choice: * * - GNU General Public License Version 2 or later (the "GPL") * http://www.gnu.org/licenses/gpl.html * * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") * http://www.gnu.org/licenses/lgpl.html * * - Mozilla Public License Version 1.1 or later (the "MPL") * http://www.mozilla.org/MPL/MPL-1.1.html * * == END LICENSE == * * This page shows all resources available in a folder in the File Browser. --> <html> <head> <title>Resources</title> <link href="browser.css" type="text/css" rel="stylesheet"> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <script type="text/javascript" src="js/common.js"></script> <script type="text/javascript"> var oListManager = new Object() ; oListManager.Clear = function() { document.body.innerHTML = '' ; } function ProtectPath(path) { path = path.replace( /\\/g, '\\\\') ; path = path.replace( /'/g, '\\\'') ; return path ; } oListManager.GetFolderRowHtml = function( folderName, folderPath ) { // Build the link to view the folder. var sLink = '<a href="#" onclick="OpenFolder(\'' + ProtectPath( folderPath ) + '\');return false;">' ; return '<tr>' + '<td width="16">' + sLink + '<img alt="" src="images/Folder.gif" width="16" height="16" border="0"><\/a>' + '<\/td><td nowrap colspan="2">&nbsp;' + sLink + folderName + '<\/a>' + '<\/td><\/tr>' ; } oListManager.GetFileRowHtml = function( fileName, fileUrl, fileSize ) { // Build the link to view the folder. var sLink = '<a href="#" onclick="OpenFile(\'' + ProtectPath( fileUrl ) + '\');return false;">' ; // Get the file icon. var sIcon = oIcons.GetIcon( fileName ) ; return '<tr>' + '<td width="16">' + sLink + '<img alt="" src="images/icons/' + sIcon + '.gif" width="16" height="16" border="0"><\/a>' + '<\/td><td>&nbsp;' + sLink + fileName + '<\/a>' + '<\/td><td align="right" nowrap>&nbsp;' + fileSize + ' KB' + '<\/td><\/tr>' ; } function OpenFolder( folderPath ) { // Load the resources list for this folder. window.parent.frames['frmFolders'].LoadFolders( folderPath ) ; } function OpenFile( fileUrl ) { window.top.opener.SetUrl( fileUrl ) ; window.top.close() ; window.top.opener.focus() ; } function LoadResources( resourceType, folderPath ) { oListManager.Clear() ; oConnector.ResourceType = resourceType ; oConnector.CurrentFolder = folderPath ; oConnector.SendCommand( 'GetFoldersAndFiles', null, GetFoldersAndFilesCallBack ) ; } function Refresh() { LoadResources( oConnector.ResourceType, oConnector.CurrentFolder ) ; } function GetFoldersAndFilesCallBack( fckXml ) { if ( oConnector.CheckError( fckXml ) != 0 ) return ; // Get the current folder path. var oFolderNode = fckXml.SelectSingleNode( 'Connector/CurrentFolder' ) ; if ( oFolderNode == null ) { alert( 'The server didn\'t reply with a proper XML data. Please check your configuration.' ) ; return ; } var sCurrentFolderPath = oFolderNode.attributes.getNamedItem('path').value ; var sCurrentFolderUrl = oFolderNode.attributes.getNamedItem('url').value ; // var dTimer = new Date() ; var oHtml = new StringBuilder( '<table id="tableFiles" cellspacing="1" cellpadding="0" width="100%" border="0">' ) ; // Add the Folders. var oNodes ; oNodes = fckXml.SelectNodes( 'Connector/Folders/Folder' ) ; for ( var i = 0 ; i < oNodes.length ; i++ ) { var sFolderName = oNodes[i].attributes.getNamedItem('name').value ; oHtml.Append( oListManager.GetFolderRowHtml( sFolderName, sCurrentFolderPath + sFolderName + "/" ) ) ; } // Add the Files. oNodes = fckXml.SelectNodes( 'Connector/Files/File' ) ; for ( var j = 0 ; j < oNodes.length ; j++ ) { var oNode = oNodes[j] ; var sFileName = oNode.attributes.getNamedItem('name').value ; var sFileSize = oNode.attributes.getNamedItem('size').value ; // Get the optional "url" attribute. If not available, build the url. var oFileUrlAtt = oNodes[j].attributes.getNamedItem('url') ; var sFileUrl = oFileUrlAtt != null ? oFileUrlAtt.value : encodeURI( sCurrentFolderUrl + sFileName ).replace( /#/g, '%23' ) ; oHtml.Append( oListManager.GetFileRowHtml( sFileName, sFileUrl, sFileSize ) ) ; } oHtml.Append( '<\/table>' ) ; document.body.innerHTML = oHtml.ToString() ; // window.top.document.title = 'Finished processing in ' + ( ( ( new Date() ) - dTimer ) / 1000 ) + ' seconds' ; } window.onload = function() { window.top.IsLoadedResourcesList = true ; } </script> </head> <body class="FileArea"> </body> </html>
10npsite
trunk/guanli/system/fckeditor/editor/filemanager/browser/default/frmresourceslist.html
HTML
asf20
5,005
/* * FCKeditor - The text editor for Internet - http://www.fckeditor.net * Copyright (C) 2003-2009 Frederico Caldeira Knabben * * == BEGIN LICENSE == * * Licensed under the terms of any of the following licenses at your * choice: * * - GNU General Public License Version 2 or later (the "GPL") * http://www.gnu.org/licenses/gpl.html * * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") * http://www.gnu.org/licenses/lgpl.html * * - Mozilla Public License Version 1.1 or later (the "MPL") * http://www.mozilla.org/MPL/MPL-1.1.html * * == END LICENSE == * * CSS styles used by all pages that compose the File Browser. */ body { background-color: #f1f1e3; margin-top:0; margin-bottom:0; } form { margin: 0; padding: 0; } .Frame { background-color: #f1f1e3; border: thin inset #f1f1e3; } body.FileArea { background-color: #ffffff; margin: 10px; } body, td, input, select { font-size: 11px; font-family: 'Microsoft Sans Serif' , Arial, Helvetica, Verdana; } .ActualFolder { font-weight: bold; font-size: 14px; } .PopupButtons { border-top: #d5d59d 1px solid; background-color: #e3e3c7; padding: 7px 10px 7px 10px; } .Button, button { color: #3b3b1f; border: #737357 1px solid; background-color: #c7c78f; } .FolderListCurrentFolder img { background-image: url(images/FolderOpened.gif); } .FolderListFolder img { background-image: url(images/Folder.gif); } .fullHeight { height: 100%; }
10npsite
trunk/guanli/system/fckeditor/editor/filemanager/browser/default/browser.css
CSS
asf20
1,554
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <!-- * FCKeditor - The text editor for Internet - http://www.fckeditor.net * Copyright (C) 2003-2009 Frederico Caldeira Knabben * * == BEGIN LICENSE == * * Licensed under the terms of any of the following licenses at your * choice: * * - GNU General Public License Version 2 or later (the "GPL") * http://www.gnu.org/licenses/gpl.html * * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") * http://www.gnu.org/licenses/lgpl.html * * - Mozilla Public License Version 1.1 or later (the "MPL") * http://www.mozilla.org/MPL/MPL-1.1.html * * == END LICENSE == * * This page shows the list of available resource types. --> <html> <head> <title>Available types</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <link href="browser.css" type="text/css" rel="stylesheet"> <script type="text/javascript" src="js/common.js"></script> <script type="text/javascript"> function SetResourceType( type ) { window.parent.frames["frmFolders"].SetResourceType( type ) ; } var aTypes = [ ['File','File'], ['Image','Image'], ['Flash','Flash'], ['Media','Media'] ] ; window.onload = function() { var oCombo = document.getElementById('cmbType') ; oCombo.innerHTML = '' ; for ( var i = 0 ; i < aTypes.length ; i++ ) { if ( oConnector.ShowAllTypes || aTypes[i][0] == oConnector.ResourceType ) AddSelectOption( oCombo, aTypes[i][1], aTypes[i][0] ) ; } } </script> </head> <body> <table class="fullHeight" cellSpacing="0" cellPadding="0" width="100%" border="0"> <tr> <td nowrap> Resource Type<BR> <select id="cmbType" style="WIDTH: 100%" onchange="SetResourceType(this.value);"> <option>&nbsp; </select> </td> </tr> </table> </body> </html>
10npsite
trunk/guanli/system/fckeditor/editor/filemanager/browser/default/frmresourcetype.html
HTML
asf20
1,899
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" "http://www.w3.org/TR/html4/frameset.dtd"> <!-- * FCKeditor - The text editor for Internet - http://www.fckeditor.net * Copyright (C) 2003-2009 Frederico Caldeira Knabben * * == BEGIN LICENSE == * * Licensed under the terms of any of the following licenses at your * choice: * * - GNU General Public License Version 2 or later (the "GPL") * http://www.gnu.org/licenses/gpl.html * * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") * http://www.gnu.org/licenses/lgpl.html * * - Mozilla Public License Version 1.1 or later (the "MPL") * http://www.mozilla.org/MPL/MPL-1.1.html * * == END LICENSE == * * This page compose the File Browser dialog frameset. --> <html> <head> <title>FCKeditor - Resources Browser</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <link href="browser.css" type="text/css" rel="stylesheet"> <script type="text/javascript" src="js/fckxml.js"></script> <script type="text/javascript"> // Automatically detect the correct document.domain (#1919). (function() { var d = document.domain ; while ( true ) { // Test if we can access a parent property. try { var test = window.opener.document.domain ; break ; } catch( e ) {} // Remove a domain part: www.mytest.example.com => mytest.example.com => example.com ... d = d.replace( /.*?(?:\.|$)/, '' ) ; if ( d.length == 0 ) break ; // It was not able to detect the domain. try { document.domain = d ; } catch (e) { break ; } } })() ; function GetUrlParam( paramName ) { var oRegex = new RegExp( '[\?&]' + paramName + '=([^&]+)', 'i' ) ; var oMatch = oRegex.exec( window.top.location.search ) ; if ( oMatch && oMatch.length > 1 ) return decodeURIComponent( oMatch[1] ) ; else return '' ; } var oConnector = new Object() ; oConnector.CurrentFolder = '/' ; var sConnUrl = GetUrlParam( 'Connector' ) ; // Gecko has some problems when using relative URLs (not starting with slash). if ( sConnUrl.substr(0,1) != '/' && sConnUrl.indexOf( '://' ) < 0 ) sConnUrl = window.location.href.replace( /browser.html.*$/, '' ) + sConnUrl ; oConnector.ConnectorUrl = sConnUrl + ( sConnUrl.indexOf('?') != -1 ? '&' : '?' ) ; var sServerPath = GetUrlParam( 'ServerPath' ) ; if ( sServerPath.length > 0 ) oConnector.ConnectorUrl += 'ServerPath=' + encodeURIComponent( sServerPath ) + '&' ; oConnector.ResourceType = GetUrlParam( 'Type' ) ; oConnector.ShowAllTypes = ( oConnector.ResourceType.length == 0 ) ; if ( oConnector.ShowAllTypes ) oConnector.ResourceType = 'File' ; oConnector.SendCommand = function( command, params, callBackFunction ) { var sUrl = this.ConnectorUrl + 'Command=' + command ; sUrl += '&Type=' + this.ResourceType ; sUrl += '&CurrentFolder=' + encodeURIComponent( this.CurrentFolder ) ; if ( params ) sUrl += '&' + params ; // Add a random salt to avoid getting a cached version of the command execution sUrl += '&uuid=' + new Date().getTime() ; var oXML = new FCKXml() ; if ( callBackFunction ) oXML.LoadUrl( sUrl, callBackFunction ) ; // Asynchronous load. else return oXML.LoadUrl( sUrl ) ; return null ; } oConnector.CheckError = function( responseXml ) { var iErrorNumber = 0 ; var oErrorNode = responseXml.SelectSingleNode( 'Connector/Error' ) ; if ( oErrorNode ) { iErrorNumber = parseInt( oErrorNode.attributes.getNamedItem('number').value, 10 ) ; switch ( iErrorNumber ) { case 0 : break ; case 1 : // Custom error. Message placed in the "text" attribute. alert( oErrorNode.attributes.getNamedItem('text').value ) ; break ; case 101 : alert( 'Folder already exists' ) ; break ; case 102 : alert( 'Invalid folder name' ) ; break ; case 103 : alert( 'You have no permissions to create the folder' ) ; break ; case 110 : alert( 'Unknown error creating folder' ) ; break ; default : alert( 'Error on your request. Error number: ' + iErrorNumber ) ; break ; } } return iErrorNumber ; } var oIcons = new Object() ; oIcons.AvailableIconsArray = [ 'ai','avi','bmp','cs','dll','doc','exe','fla','gif','htm','html','jpg','js', 'mdb','mp3','pdf','png','ppt','rdp','swf','swt','txt','vsd','xls','xml','zip' ] ; oIcons.AvailableIcons = new Object() ; for ( var i = 0 ; i < oIcons.AvailableIconsArray.length ; i++ ) oIcons.AvailableIcons[ oIcons.AvailableIconsArray[i] ] = true ; oIcons.GetIcon = function( fileName ) { var sExtension = fileName.substr( fileName.lastIndexOf('.') + 1 ).toLowerCase() ; if ( this.AvailableIcons[ sExtension ] == true ) return sExtension ; else return 'default.icon' ; } function OnUploadCompleted( errorNumber, fileUrl, fileName, customMsg ) { if (errorNumber == "1") window.frames['frmUpload'].OnUploadCompleted( errorNumber, customMsg ) ; else window.frames['frmUpload'].OnUploadCompleted( errorNumber, fileName ) ; } </script> </head> <frameset cols="150,*" class="Frame" framespacing="3" bordercolor="#f1f1e3" frameborder="1"> <frameset rows="50,*" framespacing="0"> <frame src="frmresourcetype.html" scrolling="no" frameborder="0"> <frame name="frmFolders" src="frmfolders.html" scrolling="auto" frameborder="1"> </frameset> <frameset rows="50,*,50" framespacing="0"> <frame name="frmActualFolder" src="frmactualfolder.html" scrolling="no" frameborder="0"> <frame name="frmResourcesList" src="frmresourceslist.html" scrolling="auto" frameborder="1"> <frameset cols="150,*,0" framespacing="0" frameborder="0"> <frame name="frmCreateFolder" src="frmcreatefolder.html" scrolling="no" frameborder="0"> <frame name="frmUpload" src="frmupload.html" scrolling="no" frameborder="0"> <frame name="frmUploadWorker" src="javascript:void(0)" scrolling="no" frameborder="0"> </frameset> </frameset> </frameset> </html>
10npsite
trunk/guanli/system/fckeditor/editor/filemanager/browser/default/browser.html
HTML
asf20
6,113
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <!-- * FCKeditor - The text editor for Internet - http://www.fckeditor.net * Copyright (C) 2003-2009 Frederico Caldeira Knabben * * == BEGIN LICENSE == * * Licensed under the terms of any of the following licenses at your * choice: * * - GNU General Public License Version 2 or later (the "GPL") * http://www.gnu.org/licenses/gpl.html * * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") * http://www.gnu.org/licenses/lgpl.html * * - Mozilla Public License Version 1.1 or later (the "MPL") * http://www.mozilla.org/MPL/MPL-1.1.html * * == END LICENSE == * * This page shows the list of folders available in the parent folder * of the current folder. --> <html> <head> <title>Folders</title> <link href="browser.css" type="text/css" rel="stylesheet"> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <script type="text/javascript" src="js/common.js"></script> <script type="text/javascript"> var sActiveFolder ; var bIsLoaded = false ; var iIntervalId ; var oListManager = new Object() ; oListManager.Init = function() { this.Table = document.getElementById('tableFiles') ; this.UpRow = document.getElementById('trUp') ; this.TableRows = new Object() ; } oListManager.Clear = function() { // Remove all other rows available. while ( this.Table.rows.length > 1 ) this.Table.deleteRow(1) ; // Reset the TableRows collection. this.TableRows = new Object() ; } oListManager.AddItem = function( folderName, folderPath ) { // Create the new row. var oRow = this.Table.insertRow(-1) ; oRow.className = 'FolderListFolder' ; // Build the link to view the folder. var sLink = '<a href="#" onclick="OpenFolder(\'' + folderPath + '\');return false;">' ; // Add the folder icon cell. var oCell = oRow.insertCell(-1) ; oCell.width = 16 ; oCell.innerHTML = sLink + '<img alt="" src="images/spacer.gif" width="16" height="16" border="0"><\/a>' ; // Add the folder name cell. oCell = oRow.insertCell(-1) ; oCell.noWrap = true ; oCell.innerHTML = '&nbsp;' + sLink + folderName + '<\/a>' ; this.TableRows[ folderPath ] = oRow ; } oListManager.ShowUpFolder = function( upFolderPath ) { this.UpRow.style.display = ( upFolderPath != null ? '' : 'none' ) ; if ( upFolderPath != null ) { document.getElementById('linkUpIcon').onclick = document.getElementById('linkUp').onclick = function() { LoadFolders( upFolderPath ) ; return false ; } } } function CheckLoaded() { if ( window.top.IsLoadedActualFolder && window.top.IsLoadedCreateFolder && window.top.IsLoadedUpload && window.top.IsLoadedResourcesList ) { window.clearInterval( iIntervalId ) ; bIsLoaded = true ; OpenFolder( sActiveFolder ) ; } } function OpenFolder( folderPath ) { sActiveFolder = folderPath ; if ( ! bIsLoaded ) { if ( ! iIntervalId ) iIntervalId = window.setInterval( CheckLoaded, 100 ) ; return ; } // Change the style for the select row (to show the opened folder). for ( var sFolderPath in oListManager.TableRows ) { oListManager.TableRows[ sFolderPath ].className = ( sFolderPath == folderPath ? 'FolderListCurrentFolder' : 'FolderListFolder' ) ; } // Set the current folder in all frames. window.parent.frames['frmActualFolder'].SetCurrentFolder( oConnector.ResourceType, folderPath ) ; window.parent.frames['frmCreateFolder'].SetCurrentFolder( oConnector.ResourceType, folderPath ) ; window.parent.frames['frmUpload'].SetCurrentFolder( oConnector.ResourceType, folderPath ) ; // Load the resources list for this folder. window.parent.frames['frmResourcesList'].LoadResources( oConnector.ResourceType, folderPath ) ; } function LoadFolders( folderPath ) { // Clear the folders list. oListManager.Clear() ; // Get the parent folder path. var sParentFolderPath ; if ( folderPath != '/' ) sParentFolderPath = folderPath.substring( 0, folderPath.lastIndexOf( '/', folderPath.length - 2 ) + 1 ) ; // Show/Hide the Up Folder. oListManager.ShowUpFolder( sParentFolderPath ) ; if ( folderPath != '/' ) { sActiveFolder = folderPath ; oConnector.CurrentFolder = sParentFolderPath ; oConnector.SendCommand( 'GetFolders', null, GetFoldersCallBack ) ; } else OpenFolder( '/' ) ; } function GetFoldersCallBack( fckXml ) { if ( oConnector.CheckError( fckXml ) != 0 ) return ; // Get the current folder path. var oNode = fckXml.SelectSingleNode( 'Connector/CurrentFolder' ) ; var sCurrentFolderPath = oNode.attributes.getNamedItem('path').value ; var oNodes = fckXml.SelectNodes( 'Connector/Folders/Folder' ) ; for ( var i = 0 ; i < oNodes.length ; i++ ) { var sFolderName = oNodes[i].attributes.getNamedItem('name').value ; oListManager.AddItem( sFolderName, sCurrentFolderPath + sFolderName + '/' ) ; } OpenFolder( sActiveFolder ) ; } function SetResourceType( type ) { oConnector.ResourceType = type ; LoadFolders( '/' ) ; } window.onload = function() { oListManager.Init() ; LoadFolders( '/' ) ; } </script> </head> <body class="FileArea"> <table id="tableFiles" cellSpacing="0" cellPadding="0" width="100%" border="0"> <tr id="trUp" style="DISPLAY: none"> <td width="16"><a id="linkUpIcon" href="#"><img alt="" src="images/FolderUp.gif" width="16" height="16" border="0"></a></td> <td nowrap width="100%">&nbsp;<a id="linkUp" href="#">..</a></td> </tr> </table> </body> </html>
10npsite
trunk/guanli/system/fckeditor/editor/filemanager/browser/default/frmfolders.html
HTML
asf20
5,640
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <!-- * FCKeditor - The text editor for Internet - http://www.fckeditor.net * Copyright (C) 2003-2009 Frederico Caldeira Knabben * * == BEGIN LICENSE == * * Licensed under the terms of any of the following licenses at your * choice: * * - GNU General Public License Version 2 or later (the "GPL") * http://www.gnu.org/licenses/gpl.html * * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") * http://www.gnu.org/licenses/lgpl.html * * - Mozilla Public License Version 1.1 or later (the "MPL") * http://www.mozilla.org/MPL/MPL-1.1.html * * == END LICENSE == * * Page used to create new folders in the current folder. --> <html> <head> <title>Create Folder</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <link href="browser.css" type="text/css" rel="stylesheet"> <script type="text/javascript" src="js/common.js"></script> <script type="text/javascript"> function SetCurrentFolder( resourceType, folderPath ) { oConnector.ResourceType = resourceType ; oConnector.CurrentFolder = folderPath ; } function CreateFolder() { var sFolderName ; while ( true ) { sFolderName = prompt( 'Type the name of the new folder:', '' ) ; if ( sFolderName == null ) return ; else if ( sFolderName.length == 0 ) alert( 'Please type the folder name' ) ; else break ; } oConnector.SendCommand( 'CreateFolder', 'NewFolderName=' + encodeURIComponent( sFolderName) , CreateFolderCallBack ) ; } function CreateFolderCallBack( fckXml ) { if ( oConnector.CheckError( fckXml ) == 0 ) window.parent.frames['frmResourcesList'].Refresh() ; /* // Get the current folder path. var oNode = fckXml.SelectSingleNode( 'Connector/Error' ) ; var iErrorNumber = parseInt( oNode.attributes.getNamedItem('number').value ) ; switch ( iErrorNumber ) { case 0 : window.parent.frames['frmResourcesList'].Refresh() ; break ; case 101 : alert( 'Folder already exists' ) ; break ; case 102 : alert( 'Invalid folder name' ) ; break ; case 103 : alert( 'You have no permissions to create the folder' ) ; break ; case 110 : alert( 'Unknown error creating folder' ) ; break ; default : alert( 'Error creating folder. Error number: ' + iErrorNumber ) ; break ; } */ } window.onload = function() { window.top.IsLoadedCreateFolder = true ; } </script> </head> <body> <table class="fullHeight" cellSpacing="0" cellPadding="0" width="100%" border="0"> <tr> <td> <button type="button" style="WIDTH: 100%" onclick="CreateFolder();"> <table cellSpacing="0" cellPadding="0" border="0"> <tr> <td><img height="16" alt="" src="images/Folder.gif" width="16"></td> <td>&nbsp;</td> <td nowrap>Create New Folder</td> </tr> </table> </button> </td> </tr> </table> </body> </html>
10npsite
trunk/guanli/system/fckeditor/editor/filemanager/browser/default/frmcreatefolder.html
HTML
asf20
3,050
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <!-- * FCKeditor - The text editor for Internet - http://www.fckeditor.net * Copyright (C) 2003-2009 Frederico Caldeira Knabben * * == BEGIN LICENSE == * * Licensed under the terms of any of the following licenses at your * choice: * * - GNU General Public License Version 2 or later (the "GPL") * http://www.gnu.org/licenses/gpl.html * * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") * http://www.gnu.org/licenses/lgpl.html * * - Mozilla Public License Version 1.1 or later (the "MPL") * http://www.mozilla.org/MPL/MPL-1.1.html * * == END LICENSE == * * Page used to upload new files in the current folder. --> <html> <head> <title>File Upload</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <link href="browser.css" type="text/css" rel="stylesheet" > <script type="text/javascript" src="js/common.js"></script> <script type="text/javascript"> function SetCurrentFolder( resourceType, folderPath ) { var sUrl = oConnector.ConnectorUrl + 'Command=FileUpload' ; sUrl += '&Type=' + resourceType ; sUrl += '&CurrentFolder=' + encodeURIComponent( folderPath ) ; document.getElementById('frmUpload').action = sUrl ; } function OnSubmit() { if ( document.getElementById('NewFile').value.length == 0 ) { alert( 'Please select a file from your computer' ) ; return false ; } // Set the interface elements. document.getElementById('eUploadMessage').innerHTML = 'Upload a new file in this folder (Upload in progress, please wait...)' ; document.getElementById('btnUpload').disabled = true ; return true ; } function OnUploadCompleted( errorNumber, data ) { // Reset the Upload Worker Frame. window.parent.frames['frmUploadWorker'].location = 'javascript:void(0)' ; // Reset the upload form (On IE we must do a little trick to avoid problems). if ( document.all ) document.getElementById('NewFile').outerHTML = '<input id="NewFile" name="NewFile" style="WIDTH: 100%" type="file">' ; else document.getElementById('frmUpload').reset() ; // Reset the interface elements. document.getElementById('eUploadMessage').innerHTML = 'Upload a new file in this folder' ; document.getElementById('btnUpload').disabled = false ; switch ( errorNumber ) { case 0 : window.parent.frames['frmResourcesList'].Refresh() ; break ; case 1 : // Custom error. alert( data ) ; break ; case 201 : window.parent.frames['frmResourcesList'].Refresh() ; alert( 'A file with the same name is already available. The uploaded file has been renamed to "' + data + '"' ) ; break ; case 202 : alert( 'Invalid file' ) ; break ; default : alert( 'Error on file upload. Error number: ' + errorNumber ) ; break ; } } window.onload = function() { window.top.IsLoadedUpload = true ; } </script> </head> <body> <form id="frmUpload" action="" target="frmUploadWorker" method="post" enctype="multipart/form-data" onsubmit="return OnSubmit();"> <table class="fullHeight" cellspacing="0" cellpadding="0" width="100%" border="0"> <tr> <td nowrap="nowrap"> <span id="eUploadMessage">Upload a new file in this folder</span><br> <table cellspacing="0" cellpadding="0" width="100%" border="0"> <tr> <td width="100%"><input id="NewFile" name="NewFile" style="WIDTH: 100%" type="file"></td> <td nowrap="nowrap">&nbsp;<input id="btnUpload" type="submit" value="Upload"></td> </tr> </table> </td> </tr> </table> </form> </body> </html>
10npsite
trunk/guanli/system/fckeditor/editor/filemanager/browser/default/frmupload.html
HTML
asf20
3,707
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" "http://www.w3.org/TR/html4/frameset.dtd"> <!-- * FCKeditor - The text editor for Internet - http://www.fckeditor.net * Copyright (C) 2003-2009 Frederico Caldeira Knabben * * == BEGIN LICENSE == * * Licensed under the terms of any of the following licenses at your * choice: * * - GNU General Public License Version 2 or later (the "GPL") * http://www.gnu.org/licenses/gpl.html * * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") * http://www.gnu.org/licenses/lgpl.html * * - Mozilla Public License Version 1.1 or later (the "MPL") * http://www.mozilla.org/MPL/MPL-1.1.html * * == END LICENSE == --> <html> <head> <title></title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <script type="text/javascript"> function doLoadScript( url ) { if ( !url ) return false ; var s = document.createElement( "script" ) ; s.type = "text/javascript" ; s.src = url ; document.getElementsByTagName( "head" )[ 0 ].appendChild( s ) ; return true ; } function tryLoad () { if ( typeof( opener ) == 'undefined' || !opener ) opener = parent ; // get access to global parameters oParams = opener.oldFramesetPageParams ; // make frameset rows string prepare sFramesetRows = ( parseInt( oParams.firstframeh, 10 ) || '30') + ",*," + ( parseInt( oParams.thirdframeh, 10 ) || '150' ) + ',0' ; document.getElementById( 'itFrameset' ).rows = sFramesetRows ; // dynamic including init frames and crossdomain transport code // from config sproxy_js_frameset url var addScriptUrl = oParams.sproxy_js_frameset ; doLoadScript( addScriptUrl ) ; } </script> </head> <frameset id="itFrameset" onload="tryLoad();" border="0" rows="30,*,*,0"> <frame scrolling="no" framespacing="0" frameborder="0" noresize="noresize" marginheight="0" marginwidth="2" src="" name="navbar"></frame> <frame scrolling="auto" framespacing="0" frameborder="0" noresize="noresize" marginheight="0" marginwidth="0" src="" name="mid"></frame> <frame scrolling="no" framespacing="0" frameborder="0" noresize="noresize" marginheight="1" marginwidth="1" src="" name="bot"></frame> <frame scrolling="no" framespacing="0" frameborder="0" noresize="noresize" marginheight="1" marginwidth="1" src="" name="spellsuggestall"></frame> </frameset> </html>
10npsite
trunk/guanli/system/fckeditor/editor/wsc/tmpFrameset.html
HTML
asf20
2,467
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <!-- * FCKeditor - The text editor for Internet - http://www.fckeditor.net * Copyright (C) 2003-2009 Frederico Caldeira Knabben * * == BEGIN LICENSE == * * Licensed under the terms of any of the following licenses at your * choice: * * - GNU General Public License Version 2 or later (the "GPL") * http://www.gnu.org/licenses/gpl.html * * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") * http://www.gnu.org/licenses/lgpl.html * * - Mozilla Public License Version 1.1 or later (the "MPL") * http://www.mozilla.org/MPL/MPL-1.1.html * * == END LICENSE == --> <html> <head> <title></title> <style> #wsc_frames , #errorMessage{ position:absolute; top:0px; left:0px; width:500px; height:395px; margin:0px; padding:0px; border:0px; display:block; overflow: hidden; } #wsc_frames { z-index:10;} #errorMessage { color:red; display:none; font-size:16px; font-weight:bold; padding-top:160px; text-align:center; z-index:11; } #errorMessage p { color:#000; font-size:11px; text-align:left; font-weight: normal; padding-left:80px; } </style> <script type="text/javascript"> var oEditor = window.parent.InnerDialogLoaded() ; var FCKConfig = oEditor.FCKConfig; function doLoadScript(url) { if (!url) return false ; var s = document.createElement('script') ; s.type = 'text/javascript' ; s.src = url ; document.getElementsByTagName('head')[0].appendChild(s) ; return true ; } function Ok() { return window.parent.Cancel() ; } function _callOnCancel( dT ) { window.parent.Cancel() ; } function _callOnFinish( dT ) { oEditor.FCK.SetData( dT.value ) ; window.parent.CloseDialog( true ) ; } function _cancelOnError(m) { var _conId = 'errorMessage' ; var message = m || 'Sorry, but service is unavailable now.' ; if ( typeof( WSC_Error ) == 'undefined' ) { var _con = document.createElement( 'div' ) ; _con.setAttribute( 'id', _conId ) ; document.body.appendChild( _con ) ; dom_con = document.getElementById( _conId ) ; dom_con.innerHTML = message ; dom_con.style.display = 'block' ; } //return Ok() ; } function URL_abs2full( uri ) { return uri.match( 'http' ) ? uri : document.location.protocol + '//' + document.location.host + uri ; } function clearErrorUsermessage() { // empty error container var _con = document.getElementById( 'errorMessage' ) ; if ( !_con ) return ; _con.innerHTML = '' ; _con.style.display = 'none' ; } var gInterval ; function onLoad() { clearErrorUsermessage() ; var _errorMessage = 'The SpellChecker Service is currently unavailable.' ; if ( 'undefined' != typeof( oEditor.FCK.Config.WSChLoaderScript ) ) _errorMessage = '<div>The SpellChecker Service is currently unavailable.</div><p>Error loading application<br>service host: ' + oEditor.FCK.Config.WSChLoaderScript + '</p>'; var burnSpelling = function( oName, _eMessage ) { var i = 0 ; return function () { if ( typeof( window[oName] ) == 'function' ) initAndSpell() ; else if ( i++ == 180 ) _cancelOnError( _eMessage ) ; } } gInterval = window.setInterval( burnSpelling( 'doSpell', _errorMessage ), 250 ) ; // WSC CORE init section var protocol = document.location.protocol || 'http:' ; var baseUrl = protocol + '//loader.spellchecker.net/sproxy_fck/sproxy.php' ; var plugin = "fck2" ; var customerid = oEditor.FCK.Config.WSCnCustomerId || "1:ua3xw1-2XyGJ3-GWruD3-6OFNT1-oXcuB1-nR6Bp4-hgQHc-EcYng3-sdRXG3-NOfFk" ; var wscCoreUrl = oEditor.FCK.Config.WSChLoaderScript || ( baseUrl + '?' + 'plugin=' + plugin + '&' + 'customerid='+ customerid + '&' + 'cmd=script&doc=wsc&schema=22' ) ; // load WSC core doLoadScript( wscCoreUrl ) ; } function initAndSpell() { //xall from window.setInteval expected at once if ( typeof( gInterval ) == 'undefined' ) return null ; window.clearInterval( gInterval ) ; // global var is used in FCK specific core // change on equal var used in fckplugin.js gFCKPluginName = 'wsc' ; // get the data to be checked var sData = oEditor.FCK.GetData() ; // prepare content var ctrlId = 'myEditor' ; var dCurT = document.getElementById( ctrlId ) ; dCurT.value = sData ; // service paths corecting/preparing var sPath2Scin = URL_abs2full( oEditor.FCK.Config.SkinDialogCSS ) ; var sPathCiframe = FCKConfig.BasePath + 'wsc/ciframe.html' ; var sPathFrameset = FCKConfig.BasePath + 'wsc/tmpFrameset.html' ; // language abbr standarts comparer var LangComparer = new _SP_FCK_LangCompare() ; LangComparer.setDefaulLangCode( oEditor.FCK.Language.DefaultLanguage ) ; // clear user message console (if application was loaded more then after 2 seconds) clearErrorUsermessage() ; doSpell( { ctrl : ctrlId, lang : LangComparer.getSPLangCode( oEditor.FCK.Language.GetActiveLanguage() ), winType : 'wsc_frames',// if not defined app will run on winpopup // callback binding section onCancel :window._callOnCancel, onFinish :window._callOnFinish, // @TODO: basePath assingning // some manipulations with client static pages framesetPath : sPathFrameset, iframePath : sPathCiframe, // styles defining schemaURI : sPath2Scin } ) ; return true ; } </script> </head> <body onload="onLoad()" style="padding: 0px; overflow: hidden;"> <textarea style="display: none;" id="myEditor" rows="10" cols="40"></textarea> <iframe src="" name="wsc_frames" id="wsc_frames"></iframe> </body> </html>
10npsite
trunk/guanli/system/fckeditor/editor/wsc/w.html
HTML
asf20
5,769
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <!-- * FCKeditor - The text editor for Internet - http://www.fckeditor.net * Copyright (C) 2003-2009 Frederico Caldeira Knabben * * == BEGIN LICENSE == * * Licensed under the terms of any of the following licenses at your * choice: * * - GNU General Public License Version 2 or later (the "GPL") * http://www.gnu.org/licenses/gpl.html * * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") * http://www.gnu.org/licenses/lgpl.html * * - Mozilla Public License Version 1.1 or later (the "MPL") * http://www.mozilla.org/MPL/MPL-1.1.html * * == END LICENSE == --> <html> <head> <title></title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <script type="text/javascript"> function gup( name ) { name = name.replace( /[\[]/, '\\\[' ).replace( /[\]]/, '\\\]' ) ; var regexS = '[\\?&]' + name + '=([^&#]*)' ; var regex = new RegExp( regexS ) ; var results = regex.exec( window.location.href ) ; if( results == null ) return '' ; else return results[ 1 ] ; } function sendData2Master() { var destination = parent.parent ; try { if ( destination.XDTMaster ) { var t = destination.XDTMaster.read( [ gup( 'cmd' ), gup( 'data' ) ] ) ; window.clearInterval( interval ) ; } } catch (e) {} } function onLoad() { interval = window.setInterval( sendData2Master, 100 ); } </script> </head> <body onload="onLoad()"> <p></p> </body> </html>
10npsite
trunk/guanli/system/fckeditor/editor/wsc/ciframe.html
HTML
asf20
1,593
/* * FCKeditor - The text editor for Internet - http://www.fckeditor.net * Copyright (C) 2003-2009 Frederico Caldeira Knabben * * == BEGIN LICENSE == * * Licensed under the terms of any of the following licenses at your * choice: * * - GNU General Public License Version 2 or later (the "GPL") * http://www.gnu.org/licenses/gpl.html * * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") * http://www.gnu.org/licenses/lgpl.html * * - Mozilla Public License Version 1.1 or later (the "MPL") * http://www.mozilla.org/MPL/MPL-1.1.html * * == END LICENSE == * * This CSS Style Sheet defines rules used by the editor for its internal use. */ /* ######### * WARNING * ######### * When changing this file, the minified version of it must be updated in the * fckeditor.html file (see FCK_InternalCSS). */ /* Fix to allow putting the caret at the end of the content in Firefox if clicking below the content. */ html { min-height: 100%; } table.FCK__ShowTableBorders, table.FCK__ShowTableBorders td, table.FCK__ShowTableBorders th { border: #d3d3d3 1px solid; } form { border: 1px dotted #FF0000; padding: 2px; } .FCK__Flash { border: #a9a9a9 1px solid; background-position: center center; background-image: url(images/fck_flashlogo.gif); background-repeat: no-repeat; width: 80px; height: 80px; } .FCK__UnknownObject { border: #a9a9a9 1px solid; background-position: center center; background-image: url(images/fck_plugin.gif); background-repeat: no-repeat; width: 80px; height: 80px; } /* Empty anchors images */ .FCK__Anchor { border: 1px dotted #00F; background-position: center center; background-image: url(images/fck_anchor.gif); background-repeat: no-repeat; width: 16px; height: 15px; vertical-align: middle; } /* Anchors with content */ .FCK__AnchorC { border: 1px dotted #00F; background-position: 1px center; background-image: url(images/fck_anchor.gif); background-repeat: no-repeat; padding-left: 18px; } /* Any anchor for non-IE, if we combine it with the previous rule IE ignores all. */ a[name] { border: 1px dotted #00F; background-position: 0 center; background-image: url(images/fck_anchor.gif); background-repeat: no-repeat; padding-left: 18px; } .FCK__PageBreak { background-position: center center; background-image: url(images/fck_pagebreak.gif); background-repeat: no-repeat; clear: both; display: block; float: none; width: 100%; border-top: #999999 1px dotted; border-bottom: #999999 1px dotted; border-right: 0px; border-left: 0px; height: 5px; } /* Hidden fields */ .FCK__InputHidden { width: 19px; height: 18px; background-image: url(images/fck_hiddenfield.gif); background-repeat: no-repeat; vertical-align: text-bottom; background-position: center center; } .FCK__ShowBlocks p, .FCK__ShowBlocks div, .FCK__ShowBlocks pre, .FCK__ShowBlocks address, .FCK__ShowBlocks blockquote, .FCK__ShowBlocks h1, .FCK__ShowBlocks h2, .FCK__ShowBlocks h3, .FCK__ShowBlocks h4, .FCK__ShowBlocks h5, .FCK__ShowBlocks h6 { background-repeat: no-repeat; border: 1px dotted gray; padding-top: 8px; padding-left: 8px; } .FCK__ShowBlocks p { background-image: url(images/block_p.png); } .FCK__ShowBlocks div { background-image: url(images/block_div.png); } .FCK__ShowBlocks pre { background-image: url(images/block_pre.png); } .FCK__ShowBlocks address { background-image: url(images/block_address.png); } .FCK__ShowBlocks blockquote { background-image: url(images/block_blockquote.png); } .FCK__ShowBlocks h1 { background-image: url(images/block_h1.png); } .FCK__ShowBlocks h2 { background-image: url(images/block_h2.png); } .FCK__ShowBlocks h3 { background-image: url(images/block_h3.png); } .FCK__ShowBlocks h4 { background-image: url(images/block_h4.png); } .FCK__ShowBlocks h5 { background-image: url(images/block_h5.png); } .FCK__ShowBlocks h6 { background-image: url(images/block_h6.png); }
10npsite
trunk/guanli/system/fckeditor/editor/css/fck_internal.css
CSS
asf20
4,145
/* * FCKeditor - The text editor for Internet - http://www.fckeditor.net * Copyright (C) 2003-2009 Frederico Caldeira Knabben * * == BEGIN LICENSE == * * Licensed under the terms of any of the following licenses at your * choice: * * - GNU General Public License Version 2 or later (the "GPL") * http://www.gnu.org/licenses/gpl.html * * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") * http://www.gnu.org/licenses/lgpl.html * * - Mozilla Public License Version 1.1 or later (the "MPL") * http://www.mozilla.org/MPL/MPL-1.1.html * * == END LICENSE == * * This is the default CSS file used by the editor area. It defines the * initial font of the editor and background color. * * A user can configure the editor to use another CSS file. Just change * the value of the FCKConfig.EditorAreaCSS key in the configuration * file. */ /** * The "body" styles should match your editor web site, mainly regarding * background color and font family and size. */ body { background-color: #ffffff; padding: 5px 5px 5px 5px; margin: 0px; } body, td { font-family: Arial, Verdana, sans-serif; font-size: 12px; } a[href] { color: -moz-hyperlinktext !important; /* For Firefox... mark as important, otherwise it becomes black */ text-decoration: -moz-anchor-decoration; /* For Firefox 3, otherwise no underline will be used */ } /** * Just uncomment the following block if you want to avoid spaces between * paragraphs. Remember to apply the same style in your output front end page. */ /* p, ul, li { margin-top: 0px; margin-bottom: 0px; } */ /** * Uncomment the following block, or only selected lines if appropriate, * if you have some style items that would break the styles combo box. * You can also write other CSS overrides inside the style block below * as needed and they will be applied to inside the style combo only. */ /* .SC_Item *, .SC_ItemSelected * { margin: 0px !important; padding: 0px !important; text-indent: 0px !important; clip: auto !important; position: static !important; } */ /** * The following are some sample styles used in the "Styles" toolbar command. * You should instead remove them, and include the styles used by the site * you are using the editor in. */ .Bold { font-weight: bold; } .Title { font-weight: bold; font-size: 18px; color: #cc3300; } .Code { border: #8b4513 1px solid; padding-right: 5px; padding-left: 5px; color: #000066; font-family: 'Courier New' , Monospace; background-color: #ff9933; }
10npsite
trunk/guanli/system/fckeditor/editor/css/fck_editorarea.css
CSS
asf20
2,648
/* * FCKeditor - The text editor for Internet - http://www.fckeditor.net * Copyright (C) 2003-2009 Frederico Caldeira Knabben * * == BEGIN LICENSE == * * Licensed under the terms of any of the following licenses at your * choice: * * - GNU General Public License Version 2 or later (the "GPL") * http://www.gnu.org/licenses/gpl.html * * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") * http://www.gnu.org/licenses/lgpl.html * * - Mozilla Public License Version 1.1 or later (the "MPL") * http://www.mozilla.org/MPL/MPL-1.1.html * * == END LICENSE == * * This CSS Style Sheet defines the rules to show table borders on Gecko. */ /* ######### * WARNING * ######### * When changing this file, the minified version of it must be updated in the * fckeditor.html file (see FCK_ShowTableBordersCSS). */ /* For tables with the "border" attribute set to "0" */ table[border="0"], table[border="0"] > tr > td, table[border="0"] > tr > th, table[border="0"] > tbody > tr > td, table[border="0"] > tbody > tr > th, table[border="0"] > thead > tr > td, table[border="0"] > thead > tr > th, table[border="0"] > tfoot > tr > td, table[border="0"] > tfoot > tr > th { border: #d3d3d3 1px dotted ; } /* For tables with no "border" attribute set */ table:not([border]), table:not([border]) > tr > td, table:not([border]) > tr > th, table:not([border]) > tbody > tr > td, table:not([border]) > tbody > tr > th, table:not([border]) > thead > tr > td, table:not([border]) > thead > tr > th, table:not([border]) > tfoot > tr > td, table:not([border]) > tfoot > tr > th { border: #d3d3d3 1px dotted ; }
10npsite
trunk/guanli/system/fckeditor/editor/css/fck_showtableborders_gecko.css
CSS
asf20
1,696
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <!-- * FCKeditor - The text editor for Internet - http://www.fckeditor.net * Copyright (C) 2003-2009 Frederico Caldeira Knabben * * == BEGIN LICENSE == * * Licensed under the terms of any of the following licenses at your * choice: * * - GNU General Public License Version 2 or later (the "GPL") * http://www.gnu.org/licenses/gpl.html * * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") * http://www.gnu.org/licenses/lgpl.html * * - Mozilla Public License Version 1.1 or later (the "MPL") * http://www.mozilla.org/MPL/MPL-1.1.html * * == END LICENSE == * * This page is used by all dialog box as the container. --> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title></title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <meta name="robots" content="noindex, nofollow" /> <script type="text/javascript"> // <![CDATA[ // Domain relaxation logic. (function() { var d = document.domain ; while ( true ) { // Test if we can access a parent property. try { var parentDomain = ( Args().TopWindow || E ).document.domain ; if ( document.domain != parentDomain ) document.domain = parentDomain ; break ; } catch( e ) {} // Remove a domain part: www.mytest.example.com => mytest.example.com => example.com ... d = d.replace( /.*?(?:\.|$)/, '' ) ; if ( d.length == 0 ) break ; // It was not able to detect the domain. document.domain = d ; } })() ; var E = frameElement._DialogArguments.Editor ; // It seems referencing to frameElement._DialogArguments directly would lead to memory leaks in IE. // So let's use functions to access its members instead. function Args() { return frameElement._DialogArguments ; } function ParentDialog( dialog ) { return dialog ? dialog._ParentDialog : frameElement._ParentDialog ; } var FCK = E.FCK ; var FCKTools = E.FCKTools ; var FCKDomTools = E.FCKDomTools ; var FCKDialog = E.FCKDialog ; var FCKBrowserInfo = E.FCKBrowserInfo ; var FCKConfig = E.FCKConfig ; // Steal the focus so that the caret would no longer stay in the editor iframe. window.focus() ; // Sets the Skin CSS document.write( FCKTools.GetStyleHtml( FCKConfig.SkinDialogCSS ) ) ; // Sets the language direction. var langDir = E.FCKLang.Dir ; // For IE6-, the fck_dialog_ie6.js is loaded, used to fix limitations in the browser. if ( FCKBrowserInfo.IsIE && !FCKBrowserInfo.IsIE7 ) document.write( '<' + 'script type="text/javascript" src="' + FCKConfig.SkinPath + 'fck_dialog_ie6.js"><' + '\/script>' ) ; FCKTools.RegisterDollarFunction( window ) ; // Resize related functions. var Sizer = function() { var bAutoSize = false ; var retval = { // Sets whether the dialog should auto-resize according to its content's height. SetAutoSize : function( autoSize ) { bAutoSize = autoSize ; this.RefreshSize() ; }, // Fit the dialog container's layout to the inner iframe's external size. RefreshContainerSize : function() { var frmMain = $( 'frmMain' ) ; if ( frmMain ) { // Get the container size. var height = $( 'contents' ).offsetHeight ; // Subtract the size of other elements. height -= $( 'TitleArea' ).offsetHeight ; height -= $( 'TabsRow' ).offsetHeight ; height -= $( 'PopupButtons' ).offsetHeight ; frmMain.style.height = Math.max( height, 0 ) + 'px' ; } }, // Resize and re-layout the dialog. // Triggers the onresize event for the layout logic. ResizeDialog : function( width, height ) { FCKDomTools.SetElementStyles( window.frameElement, { 'width' : width + 'px', 'height' : height + 'px' } ) ; // If the skin have defined a function for resize fixes, call it now. if ( typeof window.DoResizeFixes == 'function' ) window.DoResizeFixes() ; }, // if bAutoSize is true, automatically fit the dialog size and layout to // accomodate the inner iframe's internal height. // if bAutoSize is false, then only the layout logic for the dialog decorations // is run to accomodate the inner iframe's external height. RefreshSize : function() { if ( bAutoSize ) { var frmMain = $( 'frmMain' ) ; var innerDoc = frmMain.contentWindow.document ; var isStrict = FCKTools.IsStrictMode( innerDoc ) ; // Get the size of the frame contents. var innerWidth = isStrict ? innerDoc.documentElement.scrollWidth : innerDoc.body.scrollWidth ; var innerHeight = isStrict ? innerDoc.documentElement.scrollHeight : innerDoc.body.scrollHeight ; // Get the current frame size. var frameSize = FCKTools.GetViewPaneSize( frmMain.contentWindow ) ; var deltaWidth = innerWidth - frameSize.Width ; var deltaHeight = innerHeight - frameSize.Height ; // If the contents fits the current size. if ( deltaWidth <= 0 && deltaHeight <= 0 ) return ; var dialogWidth = frameElement.offsetWidth + Math.max( deltaWidth, 0 ) ; var dialogHeight = frameElement.offsetHeight + Math.max( deltaHeight, 0 ) ; this.ResizeDialog( dialogWidth, dialogHeight ) ; } this.RefreshContainerSize() ; } } /** * Safari seems to have a bug with the time when RefreshSize() is executed - it * thinks frmMain's innerHeight is 0 if we query the value too soon after the * page is loaded in some circumstances. (#1316) * TODO : Maybe this is not needed anymore after #35. */ if ( FCKBrowserInfo.IsSafari ) { var originalRefreshSize = retval.RefreshSize ; retval.RefreshSize = function() { FCKTools.SetTimeout( originalRefreshSize, 1, retval ) ; } } /** * IE6 has a similar bug where it sometimes thinks $('contents') has an * offsetHeight of 0 (#2114). */ if ( FCKBrowserInfo.IsIE && !FCKBrowserInfo.IsIE7 ) { var originalRefreshContainerSize = retval.RefreshContainerSize ; retval.RefreshContainerSize = function() { FCKTools.SetTimeout( originalRefreshContainerSize, 1, retval ) ; } } window.onresize = function() { retval.RefreshContainerSize() ; } window.SetAutoSize = FCKTools.Bind( retval, retval.SetAutoSize ) ; return retval ; }() ; // Manages the throbber image that appears if the inner part of dialog is taking too long to load. var Throbber = function() { var timer ; var updateThrobber = function() { var throbberParent = $( 'throbberBlock' ) ; var throbberBlocks = throbberParent.childNodes ; var lastClass = throbberParent.lastChild.className ; // From the last to the second one, copy the class from the previous one. for ( var i = throbberBlocks.length - 1 ; i > 0 ; i-- ) throbberBlocks[i].className = throbberBlocks[i-1].className ; // For the first one, copy the last class (rotation). throbberBlocks[0].className = lastClass ; } return { Show : function( waitMilliseconds ) { // Auto-setup the Show function to be called again after the // requested amount of time. if ( waitMilliseconds && waitMilliseconds > 0 ) { timer = FCKTools.SetTimeout( this.Show, waitMilliseconds, this, null, window ) ; return ; } var throbberParent = $( 'throbberBlock' ) ; if (throbberParent.childNodes.length == 0) { // Create the throbber blocks. var classIds = [ 1,2,3,4,5,4,3,2 ] ; while ( classIds.length > 0 ) throbberParent.appendChild( document.createElement( 'div' ) ).className = ' throbber_' + classIds.shift() ; } // Center the throbber. var frm = $( 'contents' ) ; var frmCoords = FCKTools.GetDocumentPosition( window, frm ) ; var x = frmCoords.x + ( frm.offsetWidth - throbberParent.offsetWidth ) / 2 ; var y = frmCoords.y + ( frm.offsetHeight - throbberParent.offsetHeight ) / 2 ; throbberParent.style.left = parseInt( x, 10 ) + 'px' ; throbberParent.style.top = parseInt( y, 10 ) + 'px' ; // Show it. throbberParent.style.visibility = '' ; // Hide tabs and buttons: $( 'Tabs' ).style.visibility = 'hidden' ; $( 'PopupButtons' ).style.visibility = 'hidden' ; // Setup the animation interval. timer = setInterval( updateThrobber, 100 ) ; }, Hide : function() { if ( timer ) { clearInterval( timer ) ; timer = null ; } $( 'throbberBlock' ).style.visibility = 'hidden' ; // Show tabs and buttons: $( 'Tabs' ).style.visibility = '' ; $( 'PopupButtons' ).style.visibility = '' ; } } ; }() ; // Drag and drop handlers. var DragAndDrop = function() { var registeredWindows = [] ; var lastCoords ; var currentPos ; var cleanUpHandlers = function() { for ( var i = 0 ; i < registeredWindows.length ; i++ ) { FCKTools.RemoveEventListener( registeredWindows[i].document, 'mousemove', dragMouseMoveHandler ) ; FCKTools.RemoveEventListener( registeredWindows[i].document, 'mouseup', dragMouseUpHandler ) ; } } var dragMouseMoveHandler = function( evt ) { if ( !lastCoords ) return ; if ( !evt ) evt = FCKTools.GetElementDocument( this ).parentWindow.event ; // Updated the last coordinates. var currentCoords = { x : evt.screenX, y : evt.screenY } ; currentPos = { x : currentPos.x + ( currentCoords.x - lastCoords.x ), y : currentPos.y + ( currentCoords.y - lastCoords.y ) } ; lastCoords = currentCoords ; frameElement.style.left = currentPos.x + 'px' ; frameElement.style.top = currentPos.y + 'px' ; if ( evt.preventDefault ) evt.preventDefault() ; else evt.returnValue = false ; } var dragMouseUpHandler = function( evt ) { if ( !lastCoords ) return ; if ( !evt ) evt = FCKTools.GetElementDocument( this ).parentWindow.event ; cleanUpHandlers() ; lastCoords = null ; } return { MouseDownHandler : function( evt ) { var view = null ; if ( !evt ) { view = FCKTools.GetElementDocument( this ).parentWindow ; evt = view.event ; } else view = evt.view ; var target = evt.srcElement || evt.target ; if ( target.id == 'closeButton' || target.className == 'PopupTab' || target.className == 'PopupTabSelected' ) return ; lastCoords = { x : evt.screenX, y : evt.screenY } ; // Save the current IFRAME position. currentPos = { x : parseInt( FCKDomTools.GetCurrentElementStyle( frameElement, 'left' ), 10 ), y : parseInt( FCKDomTools.GetCurrentElementStyle( frameElement, 'top' ), 10 ) } ; for ( var i = 0 ; i < registeredWindows.length ; i++ ) { FCKTools.AddEventListener( registeredWindows[i].document, 'mousemove', dragMouseMoveHandler ) ; FCKTools.AddEventListener( registeredWindows[i].document, 'mouseup', dragMouseUpHandler ) ; } if ( evt.preventDefault ) evt.preventDefault() ; else evt.returnValue = false ; }, RegisterHandlers : function( w ) { registeredWindows.push( w ) ; } } }() ; // Selection related functions. //(Became simple shortcuts after the fix for #1990) var Selection = { /** * Ensures that the editing area contains an active selection. This is a * requirement for IE, as it looses the selection when the focus moves to other * frames. */ EnsureSelection : function() { // Move the focus to the Cancel button so even if the dialog contains a // contentEditable element the selection is properly restored in the editor #2496 window.focus() ; $( 'btnCancel' ).focus() ; FCK.Selection.Restore() ; }, /** * Get the FCKSelection object for the editor instance. */ GetSelection : function() { return FCK.Selection ; }, /** * Get the selected element in the editing area (for object selections). */ GetSelectedElement : function() { return FCK.Selection.GetSelectedElement() ; } } // Tab related functions. var Tabs = function() { // Only element ids should be stored here instead of element references since setSelectedTab and TabDiv_OnClick // would build circular references with the element references inside and cause memory leaks in IE6. var oTabs = new Object() ; var setSelectedTab = function( tabCode ) { for ( var sCode in oTabs ) { if ( sCode == tabCode ) $( oTabs[sCode] ).className = 'PopupTabSelected' ; else $( oTabs[sCode] ).className = 'PopupTab' ; } if ( typeof( window.frames["frmMain"].OnDialogTabChange ) == 'function' ) window.frames["frmMain"].OnDialogTabChange( tabCode ) ; } function TabDiv_OnClick() { setSelectedTab( this.TabCode ) ; } window.AddTab = function( tabCode, tabText, startHidden ) { if ( typeof( oTabs[ tabCode ] ) != 'undefined' ) return ; var eTabsRow = $( 'Tabs' ) ; var oCell = eTabsRow.insertCell( eTabsRow.cells.length - 1 ) ; oCell.noWrap = true ; var oDiv = document.createElement( 'DIV' ) ; oDiv.className = 'PopupTab' ; oDiv.innerHTML = tabText ; oDiv.TabCode = tabCode ; oDiv.onclick = TabDiv_OnClick ; oDiv.id = Math.random() ; if ( startHidden ) oDiv.style.display = 'none' ; eTabsRow = $( 'TabsRow' ) ; oCell.appendChild( oDiv ) ; if ( eTabsRow.style.display == 'none' ) { var eTitleArea = $( 'TitleArea' ) ; eTitleArea.className = 'PopupTitle' ; oDiv.className = 'PopupTabSelected' ; eTabsRow.style.display = '' ; if ( window.onresize ) window.onresize() ; } oTabs[ tabCode ] = oDiv.id ; FCKTools.DisableSelection( oDiv ) ; } ; window.SetSelectedTab = setSelectedTab ; window.SetTabVisibility = function( tabCode, isVisible ) { var oTab = $( oTabs[ tabCode ] ) ; oTab.style.display = isVisible ? '' : 'none' ; if ( ! isVisible && oTab.className == 'PopupTabSelected' ) { for ( var sCode in oTabs ) { if ( $( oTabs[sCode] ).style.display != 'none' ) { setSelectedTab( sCode ) ; break ; } } } } ; }() ; // readystatechange handler for registering drag and drop handlers in cover // iframes, defined out here to avoid memory leak. // Do NOT put this function as a private function as it will induce memory leak // in IE and it's not detectable with Drip or sIEve and undetectable leaks are // really nasty (sigh). var onReadyRegister = function() { if ( this.readyState != 'complete' ) return ; DragAndDrop.RegisterHandlers( this.contentWindow ) ; } ; // The business logic of the dialog, dealing with operational things like // dialog open/dialog close/enable/disable/etc. (function() { var setOnKeyDown = function( targetDocument ) { targetDocument.onkeydown = function ( e ) { e = e || event || this.parentWindow.event ; switch ( e.keyCode ) { case 13 : // ENTER var oTarget = e.srcElement || e.target ; if ( oTarget.tagName == 'TEXTAREA' ) return true ; Ok() ; return false ; case 27 : // ESC Cancel() ; return false ; } return true ; } } ; var contextMenuBlocker = function( e ) { var sTagName = e.target.tagName ; if ( ! ( ( sTagName == "INPUT" && e.target.type == "text" ) || sTagName == "TEXTAREA" ) ) e.preventDefault() ; } ; var disableContextMenu = function( targetDocument ) { if ( FCKBrowserInfo.IsIE ) return ; targetDocument.addEventListener( 'contextmenu', contextMenuBlocker, true ) ; } ; // Program entry point. window.Init = function() { $( 'contents' ).dir = langDir; // Start the throbber timer. Throbber.Show( 1000 ) ; Sizer.RefreshContainerSize() ; LoadInnerDialog() ; FCKTools.DisableSelection( document.body ) ; // Make the title area draggable. var titleElement = $( 'header' ) ; titleElement.onmousedown = DragAndDrop.MouseDownHandler ; // Connect mousemove and mouseup events from dialog frame and outer window to dialog dragging logic. DragAndDrop.RegisterHandlers( window ) ; DragAndDrop.RegisterHandlers( Args().TopWindow ) ; // Disable the previous dialog if it exists. if ( ParentDialog() ) { ParentDialog().contentWindow.SetEnabled( false ) ; if ( FCKBrowserInfo.IsIE && !FCKBrowserInfo.IsIE7 ) { var currentParent = ParentDialog() ; while ( currentParent ) { var blockerFrame = currentParent.contentWindow.$( 'blocker' ) ; if ( blockerFrame.readyState == 'complete' ) DragAndDrop.RegisterHandlers( blockerFrame.contentWindow ) ; else blockerFrame.onreadystatechange = onReadyRegister ; currentParent = ParentDialog( currentParent ) ; } } else { var currentParent = ParentDialog() ; while ( currentParent ) { DragAndDrop.RegisterHandlers( currentParent.contentWindow ) ; currentParent = ParentDialog( currentParent ) ; } } } // If this is the only dialog on screen, enable the background cover. if ( FCKBrowserInfo.IsIE && !FCKBrowserInfo.IsIE7 ) { var blockerFrame = FCKDialog.GetCover().firstChild ; if ( blockerFrame.readyState == 'complete' ) DragAndDrop.RegisterHandlers( blockerFrame.contentWindow ) ; else blockerFrame.onreadystatechange = onReadyRegister; } // Add Enter/Esc hotkeys and disable context menu for the dialog. setOnKeyDown( document ) ; disableContextMenu( document ) ; } ; window.LoadInnerDialog = function() { if ( window.onresize ) window.onresize() ; // First of all, translate the dialog box contents. E.FCKLanguageManager.TranslatePage( document ) ; // Create the IFRAME that holds the dialog contents. $( 'innerContents' ).innerHTML = '<iframe id="frmMain" src="' + Args().Page + '" name="frmMain" frameborder="0" width="100%" height="100%" scrolling="auto" style="visibility: hidden;" allowtransparency="true"><\/iframe>' ; } ; window.InnerDialogLoaded = function() { // If the dialog has been closed before the iframe is loaded, do nothing. if ( !frameElement.parentNode ) return null ; Throbber.Hide() ; var frmMain = $('frmMain') ; var innerWindow = frmMain.contentWindow ; var innerDoc = innerWindow.document ; // Show the loaded iframe. frmMain.style.visibility = '' ; // Set the language direction. innerDoc.documentElement.dir = langDir ; // Sets the Skin CSS. innerDoc.write( FCKTools.GetStyleHtml( FCKConfig.SkinDialogCSS ) ) ; setOnKeyDown( innerDoc ) ; disableContextMenu( innerDoc ) ; Sizer.RefreshContainerSize(); DragAndDrop.RegisterHandlers( innerWindow ) ; innerWindow.focus() ; return E ; } ; window.SetOkButton = function( showIt ) { $('btnOk').style.visibility = ( showIt ? '' : 'hidden' ) ; } ; window.Ok = function() { Selection.EnsureSelection() ; var frmMain = window.frames["frmMain"] ; if ( frmMain.Ok && frmMain.Ok() ) CloseDialog() ; else frmMain.focus() ; } ; window.Cancel = function( dontFireChange ) { Selection.EnsureSelection() ; return CloseDialog( dontFireChange ) ; } ; window.CloseDialog = function( dontFireChange ) { Throbber.Hide() ; // Points the src to a non-existent location to avoid loading errors later, in case the dialog // haven't been completed loaded at this point. if ( $( 'frmMain' ) ) $( 'frmMain' ).src = FCKTools.GetVoidUrl() ; if ( !dontFireChange && !FCK.EditMode ) { // All dialog windows, by default, will fire the "OnSelectionChange" // event, no matter the Ok or Cancel button has been pressed. // It seems that OnSelectionChange may enter on a concurrency state // on some situations (#1965), so we should put the event firing in // the execution queue instead of executing it immediately. setTimeout( function() { FCK.Events.FireEvent( 'OnSelectionChange' ) ; }, 0 ) ; } FCKDialog.OnDialogClose( window ) ; } ; window.SetEnabled = function( isEnabled ) { var cover = $( 'cover' ) ; cover.style.display = isEnabled ? 'none' : '' ; if ( FCKBrowserInfo.IsIE && !FCKBrowserInfo.IsIE7 ) { if ( !isEnabled ) { // Inser the blocker IFRAME before the cover. var blocker = document.createElement( 'iframe' ) ; blocker.src = FCKTools.GetVoidUrl() ; blocker.hideFocus = true ; blocker.frameBorder = 0 ; blocker.id = blocker.className = 'blocker' ; cover.appendChild( blocker ) ; } else { var blocker = $( 'blocker' ) ; if ( blocker && blocker.parentNode ) blocker.parentNode.removeChild( blocker ) ; } } } ; })() ; // ]]> </script> </head> <body onload="Init();" class="PopupBody"> <div class="contents" id="contents"> <div id="header"> <div id="TitleArea" class="PopupTitle PopupTitleBorder"> <script type="text/javascript"> // <![CDATA[ document.write( Args().Title ) ; // ]]> </script> <div id="closeButton" onclick="Cancel();"></div> </div> <div id="TabsRow" class="PopupTabArea" style="display: none"> <table border="0" cellpadding="0" cellspacing="0" width="100%"> <tr id="Tabs"> <td class="PopupTabEmptyArea">&nbsp;</td> <td class="PopupTabEmptyArea" width="100%">&nbsp;</td> </tr> </table> </div> </div> <div id="innerContents"></div> <div id="PopupButtons" class="PopupButtons"> <table border="0" cellpadding="0" cellspacing="0"> <tr> <td width="100%">&nbsp;</td> <td nowrap="nowrap"> <input id="btnOk" style="visibility: hidden;" type="button" value="Ok" class="Button" onclick="Ok();" fckLang="DlgBtnOK" /> &nbsp; <input id="btnCancel" type="button" value="Cancel" class="Button" onclick="Cancel();" fckLang="DlgBtnCancel" /> </td> </tr> </table> </div> </div> <div class="tl"></div> <div class="tc"></div> <div class="tr"></div> <div class="ml"></div> <div class="mr"></div> <div class="bl"></div> <div class="bc"></div> <div class="br"></div> <div class="cover" id="cover" style="display:none"></div> <div id="throbberBlock" style="position: absolute; visibility: hidden"></div> <script type="text/javascript"> // <![CDATA[ // Set the class name for language direction. document.body.className += ' ' + langDir ; var cover = $( 'cover' ) ; cover.style.backgroundColor = FCKConfig.BackgroundBlockerColor ; FCKDomTools.SetOpacity( cover, FCKConfig.BackgroundBlockerOpacity ) ; // ]]> </script> </body> </html>
10npsite
trunk/guanli/system/fckeditor/editor/fckdialog.html
HTML
asf20
22,915
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <!-- * FCKeditor - The text editor for Internet - http://www.fckeditor.net * Copyright (C) 2003-2009 Frederico Caldeira Knabben * * == BEGIN LICENSE == * * Licensed under the terms of any of the following licenses at your * choice: * * - GNU General Public License Version 2 or later (the "GPL") * http://www.gnu.org/licenses/gpl.html * * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") * http://www.gnu.org/licenses/lgpl.html * * - Mozilla Public License Version 1.1 or later (the "MPL") * http://www.mozilla.org/MPL/MPL-1.1.html * * == END LICENSE == * * Main page that holds the editor. --> <html> <head> <title>FCKeditor</title> <meta name="robots" content="noindex, nofollow"> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <meta http-equiv="Cache-Control" content="public"> <script type="text/javascript"> // #1645: Alert the user if opening FCKeditor in FF3 from local filesystem // without security.fileuri.strict_origin_policy disabled. if ( document.location.protocol == 'file:' ) { try { window.parent.document.domain ; } catch ( e ) { window.addEventListener( 'load', function() { document.body.innerHTML = '\ <div style="border: 1px red solid; font-family: arial; font-size: 12px; color: red; padding:10px;">\ <p>\ <b>Your browser security settings don\'t allow FCKeditor to be opened from\ the local filesystem.<\/b>\ <\/p>\ <p>\ Please open the <b>about:config<\/b> page and disable the\ &quot;security.fileuri.strict_origin_policy&quot; option; then load this page again.\ <\/p>\ <p>\ Check our <a href="http://docs.fckeditor.net/FCKeditor_2.x/Developers_Guide/FAQ#ff3perms">FAQ<\/a>\ for more information.\ <\/p>\ <\/div>' ; }, false ) ; } } // Save a reference to the default domain. var FCK_ORIGINAL_DOMAIN ; // Automatically detect the correct document.domain (#123). (function() { var d = FCK_ORIGINAL_DOMAIN = document.domain ; while ( true ) { // Test if we can access a parent property. try { var test = window.parent.document.domain ; break ; } catch( e ) {} // Remove a domain part: www.mytest.example.com => mytest.example.com => example.com ... d = d.replace( /.*?(?:\.|$)/, '' ) ; if ( d.length == 0 ) break ; // It was not able to detect the domain. try { document.domain = d ; } catch (e) { break ; } } })() ; // Save a reference to the detected runtime domain. var FCK_RUNTIME_DOMAIN = document.domain ; var FCK_IS_CUSTOM_DOMAIN = ( FCK_ORIGINAL_DOMAIN != FCK_RUNTIME_DOMAIN ) ; // Instead of loading scripts and CSSs using inline tags, all scripts are // loaded by code. In this way we can guarantee the correct processing order, // otherwise external scripts and inline scripts could be executed in an // unwanted order (IE). function LoadScript( url ) { document.write( '<scr' + 'ipt type="text/javascript" src="' + url + '"><\/scr' + 'ipt>' ) ; } // Main editor scripts. var sSuffix = ( /*@cc_on!@*/false ) ? 'ie' : 'gecko' ; LoadScript( 'js/fckeditorcode_' + sSuffix + '.js' ) ; // Base configuration file. LoadScript( '../fckconfig.js' ) ; </script> <script type="text/javascript"> // Adobe AIR compatibility file. if ( FCKBrowserInfo.IsAIR ) LoadScript( 'js/fckadobeair.js' ) ; if ( FCKBrowserInfo.IsIE ) { // Remove IE mouse flickering. try { document.execCommand( 'BackgroundImageCache', false, true ) ; } catch (e) { // We have been reported about loading problems caused by the above // line. For safety, let's just ignore errors. } // Create the default cleanup object used by the editor. FCK.IECleanup = new FCKIECleanup( window ) ; FCK.IECleanup.AddItem( FCKTempBin, FCKTempBin.Reset ) ; FCK.IECleanup.AddItem( FCK, FCK_Cleanup ) ; } // The first function to be called on selection change must the the styles // change checker, because the result of its processing may be used by another // functions listening to the same event. FCK.Events.AttachEvent( 'OnSelectionChange', function() { FCKStyles.CheckSelectionChanges() ; } ) ; // The config hidden field is processed immediately, because // CustomConfigurationsPath may be set in the page. FCKConfig.ProcessHiddenField() ; // Load the custom configurations file (if defined). if ( FCKConfig.CustomConfigurationsPath.length > 0 ) LoadScript( FCKConfig.CustomConfigurationsPath ) ; </script> <script type="text/javascript"> // Load configurations defined at page level. FCKConfig_LoadPageConfig() ; FCKConfig_PreProcess() ; // Load the full debug script. if ( FCKConfig.Debug ) LoadScript( '_source/internals/fckdebug.js' ) ; </script> <script type="text/javascript"> // CSS minified by http://iceyboard.no-ip.org/projects/css_compressor (see _dev/css_compression.txt). var FCK_InternalCSS = FCKTools.FixCssUrls( FCKConfig.BasePath + 'css/', 'html{min-height:100%}table.FCK__ShowTableBorders,table.FCK__ShowTableBorders td,table.FCK__ShowTableBorders th{border:#d3d3d3 1px solid}form{border:1px dotted #F00;padding:2px}.FCK__Flash{border:#a9a9a9 1px solid;background-position:center center;background-image:url(images/fck_flashlogo.gif);background-repeat:no-repeat;width:80px;height:80px}.FCK__UnknownObject{border:#a9a9a9 1px solid;background-position:center center;background-image:url(images/fck_plugin.gif);background-repeat:no-repeat;width:80px;height:80px}.FCK__Anchor{border:1px dotted #00F;background-position:center center;background-image:url(images/fck_anchor.gif);background-repeat:no-repeat;width:16px;height:15px;vertical-align:middle}.FCK__AnchorC{border:1px dotted #00F;background-position:1px center;background-image:url(images/fck_anchor.gif);background-repeat:no-repeat;padding-left:18px}a[name]{border:1px dotted #00F;background-position:0 center;background-image:url(images/fck_anchor.gif);background-repeat:no-repeat;padding-left:18px}.FCK__PageBreak{background-position:center center;background-image:url(images/fck_pagebreak.gif);background-repeat:no-repeat;clear:both;display:block;float:none;width:100%;border-top:#999 1px dotted;border-bottom:#999 1px dotted;border-right:0;border-left:0;height:5px}.FCK__InputHidden{width:19px;height:18px;background-image:url(images/fck_hiddenfield.gif);background-repeat:no-repeat;vertical-align:text-bottom;background-position:center center}.FCK__ShowBlocks p,.FCK__ShowBlocks div,.FCK__ShowBlocks pre,.FCK__ShowBlocks address,.FCK__ShowBlocks blockquote,.FCK__ShowBlocks h1,.FCK__ShowBlocks h2,.FCK__ShowBlocks h3,.FCK__ShowBlocks h4,.FCK__ShowBlocks h5,.FCK__ShowBlocks h6{background-repeat:no-repeat;border:1px dotted gray;padding-top:8px;padding-left:8px}.FCK__ShowBlocks p{background-image:url(images/block_p.png)}.FCK__ShowBlocks div{background-image:url(images/block_div.png)}.FCK__ShowBlocks pre{background-image:url(images/block_pre.png)}.FCK__ShowBlocks address{background-image:url(images/block_address.png)}.FCK__ShowBlocks blockquote{background-image:url(images/block_blockquote.png)}.FCK__ShowBlocks h1{background-image:url(images/block_h1.png)}.FCK__ShowBlocks h2{background-image:url(images/block_h2.png)}.FCK__ShowBlocks h3{background-image:url(images/block_h3.png)}.FCK__ShowBlocks h4{background-image:url(images/block_h4.png)}.FCK__ShowBlocks h5{background-image:url(images/block_h5.png)}.FCK__ShowBlocks h6{background-image:url(images/block_h6.png)}' ) ; var FCK_ShowTableBordersCSS = FCKTools.FixCssUrls( FCKConfig.BasePath + 'css/', 'table:not([border]),table:not([border]) > tr > td,table:not([border]) > tr > th,table:not([border]) > tbody > tr > td,table:not([border]) > tbody > tr > th,table:not([border]) > thead > tr > td,table:not([border]) > thead > tr > th,table:not([border]) > tfoot > tr > td,table:not([border]) > tfoot > tr > th,table[border=\"0\"],table[border=\"0\"] > tr > td,table[border=\"0\"] > tr > th,table[border=\"0\"] > tbody > tr > td,table[border=\"0\"] > tbody > tr > th,table[border=\"0\"] > thead > tr > td,table[border=\"0\"] > thead > tr > th,table[border=\"0\"] > tfoot > tr > td,table[border=\"0\"] > tfoot > tr > th{border:#d3d3d3 1px dotted}' ) ; // Popup the debug window if debug mode is set to true. It guarantees that the // first debug message will not be lost. if ( FCKConfig.Debug ) FCKDebug._GetWindow() ; // Load the active skin CSS. document.write( FCKTools.GetStyleHtml( FCKConfig.SkinEditorCSS ) ) ; // Load the language file. FCKLanguageManager.Initialize() ; LoadScript( 'lang/' + FCKLanguageManager.ActiveLanguage.Code + '.js' ) ; </script> <script type="text/javascript"> // Initialize the editing area context menu. FCK_ContextMenu_Init() ; FCKPlugins.Load() ; </script> <script type="text/javascript"> // Set the editor interface direction. window.document.dir = FCKLang.Dir ; </script> <script type="text/javascript"> window.onload = function() { InitializeAPI() ; if ( FCKBrowserInfo.IsIE ) FCK_PreloadImages() ; else LoadToolbarSetup() ; } function LoadToolbarSetup() { FCKeditorAPI._FunctionQueue.Add( LoadToolbar ) ; } function LoadToolbar() { var oToolbarSet = FCK.ToolbarSet = FCKToolbarSet_Create() ; if ( oToolbarSet.IsLoaded ) StartEditor() ; else { oToolbarSet.OnLoad = StartEditor ; oToolbarSet.Load( FCKURLParams['Toolbar'] || 'Default' ) ; } } function StartEditor() { // Remove the onload listener. FCK.ToolbarSet.OnLoad = null ; FCKeditorAPI._FunctionQueue.Remove( LoadToolbar ) ; FCK.Events.AttachEvent( 'OnStatusChange', WaitForActive ) ; // Start the editor. FCK.StartEditor() ; } function WaitForActive( editorInstance, newStatus ) { if ( newStatus == FCK_STATUS_ACTIVE ) { if ( FCKBrowserInfo.IsGecko ) FCKTools.RunFunction( window.onresize ) ; if ( !FCKConfig.PreventSubmitHandler ) _AttachFormSubmitToAPI() ; 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 ) ; } } // Gecko and Webkit browsers don't calculate well the IFRAME size so we must // recalculate it every time the window size changes. if ( FCKBrowserInfo.IsGecko || FCKBrowserInfo.IsSafari ) { window.onresize = function( e ) { // Running in Firefox's chrome makes the window receive the event including subframes. // we care only about this window. Ticket #1642. // #2002: The originalTarget from the event can be the current document, the window, or the editing area. if ( e && e.originalTarget && e.originalTarget !== document && e.originalTarget !== window && (!e.originalTarget.ownerDocument || e.originalTarget.ownerDocument != document )) return ; var oCell = document.getElementById( 'xEditingArea' ) ; var eInnerElement = oCell.firstChild ; if ( eInnerElement ) { eInnerElement.style.height = '0px' ; eInnerElement.style.height = ( oCell.scrollHeight - 2 ) + 'px' ; } } } </script> </head> <body> <table width="100%" cellpadding="0" cellspacing="0" style="height: 100%; table-layout: fixed"> <tr id="xToolbarRow" style="display: none"> <td id="xToolbarSpace" style="overflow: hidden"> <table width="100%" cellpadding="0" cellspacing="0"> <tr id="xCollapsed" style="display: none"> <td id="xExpandHandle" class="TB_Expand" colspan="3"> <img class="TB_ExpandImg" alt="" src="images/spacer.gif" width="8" height="4" /></td> </tr> <tr id="xExpanded" style="display: none"> <td id="xTBLeftBorder" class="TB_SideBorder" style="width: 1px; display: none;"></td> <td id="xCollapseHandle" style="display: none" class="TB_Collapse" valign="bottom"> <img class="TB_CollapseImg" alt="" src="images/spacer.gif" width="8" height="4" /></td> <td id="xToolbar" class="TB_ToolbarSet"></td> <td class="TB_SideBorder" style="width: 1px"></td> </tr> </table> </td> </tr> <tr> <td id="xEditingArea" valign="top" style="height: 100%"></td> </tr> </table> </body> </html>
10npsite
trunk/guanli/system/fckeditor/editor/fckeditor.html
HTML
asf20
12,475
[//lasso /* * FCKeditor - The text editor for Internet - http://www.fckeditor.net * Copyright (C) 2003-2009 Frederico Caldeira Knabben * * == BEGIN LICENSE == * * Licensed under the terms of any of the following licenses at your * choice: * * - GNU General Public License Version 2 or later (the "GPL") * http://www.gnu.org/licenses/gpl.html * * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") * http://www.gnu.org/licenses/lgpl.html * * - Mozilla Public License Version 1.1 or later (the "MPL") * http://www.mozilla.org/MPL/MPL-1.1.html * * == END LICENSE == * * This is the integration file for Lasso. * * It defines the FCKeditor class ("custom type" in Lasso terms) that can * be used to create editor instances in Lasso pages on server side. */ define_type( 'editor', -namespace='fck_', -description='Creates an instance of FCKEditor.' ); local( 'instancename' = 'FCKEditor1', 'width' = '100%', 'height' = '200', 'toolbarset' = 'Default', 'initialvalue' = string, 'basepath' = '/fckeditor/', 'config' = array, 'checkbrowser' = true, 'displayerrors' = false ); define_tag( 'onCreate', -required='instancename', -type='string', -optional='width', -type='string', -optional='height', -type='string', -optional='toolbarset', -type='string', -optional='initialvalue', -type='string', -optional='basepath', -type='string', -optional='config', -type='array' ); self->instancename = #instancename; local_defined('width') ? self->width = #width; local_defined('height') ? self->height = #height; local_defined('toolbarset') ? self->toolbarset = #toolbarset; local_defined('initialvalue') ? self->initialvalue = #initialvalue; local_defined('basepath') ? self->basepath = #basepath; local_defined('config') ? self->config = #config; /define_tag; define_tag('create'); if(self->isCompatibleBrowser); local('out' = ' <input type="hidden" id="' + self->instancename + '" name="' + self->instancename + '" value="' + encode_html(self->initialvalue) + '" style="display:none" /> ' + self->parseConfig + ' <iframe id="' + self->instancename + '___Frame" src="' + self->basepath + 'editor/fckeditor.html?InstanceName=' + self->instancename + '&Toolbar=' + self->toolbarset + '" width="' + self->width + '" height="' + self->height + '" frameborder="0" scrolling="no"></iframe> '); else; local('out' = ' <textarea name="' + self->instancename + '" rows="4" cols="40" style="width: ' + self->width + '; height: ' + self->height + '">' + encode_html(self->initialvalue) + '</textarea> '); /if; return(@#out); /define_tag; define_tag('isCompatibleBrowser'); local('result' = false); if (client_browser->Find("MSIE") && !client_browser->Find("mac") && !client_browser->Find("Opera")); #result = client_browser->Substring(client_browser->Find("MSIE")+5,3)>=5.5; /if; if (client_browser->Find("Gecko/")); #result = client_browser->Substring(client_browser->Find("Gecko/")+6,8)>=20030210; /if; if (client_browser->Find("Opera/")); #result = client_browser->Substring(client_browser->Find("Opera/")+6,4)>=9.5; /if; if (client_browser->Find("AppleWebKit/")); #result = client_browser->Substring(client_browser->Find("AppleWebKit/")+12,3)>=522; /if; return(#result); /define_tag; define_tag('parseConfig'); if(self->config->size); local('out' = '<input type="hidden" id="' + self->instancename + '___Config" value="'); iterate(self->config, local('this')); loop_count > 1 ? #out += '&amp;'; #out += encode_html(#this->first) + '=' + encode_html(#this->second); /iterate; #out += '" style="display:none" />\n'; return(@#out); /if; /define_tag; /define_type; ]
10npsite
trunk/guanli/system/fckeditor/fckeditor.lasso
Lasso
asf20
3,949
/* * FCKeditor - The text editor for Internet - http://www.fckeditor.net * Copyright (C) 2003-2009 Frederico Caldeira Knabben * * == BEGIN LICENSE == * * Licensed under the terms of any of the following licenses at your * choice: * * - GNU General Public License Version 2 or later (the "GPL") * http://www.gnu.org/licenses/gpl.html * * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") * http://www.gnu.org/licenses/lgpl.html * * - Mozilla Public License Version 1.1 or later (the "MPL") * http://www.mozilla.org/MPL/MPL-1.1.html * * == END LICENSE == * * 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. */ // FCKeditor Class var FCKeditor = function( instanceName, width, height, toolbarSet, value ) { // Properties this.InstanceName = instanceName ; this.Width = width || '100%' ; this.Height = height || '200' ; this.ToolbarSet = toolbarSet || 'Default' ; this.Value = value || '' ; this.BasePath = FCKeditor.BasePath ; this.CheckBrowser = true ; this.DisplayErrors = true ; this.Config = new Object() ; // Events this.OnError = null ; // function( source, errorNumber, errorDescription ) } /** * This is the default BasePath used by all editor instances. */ FCKeditor.BasePath = '/fckeditor/' ; /** * The minimum height used when replacing textareas. */ FCKeditor.MinHeight = 200 ; /** * The minimum width used when replacing textareas. */ FCKeditor.MinWidth = 750 ; FCKeditor.prototype.Version = '2.6.5' ; FCKeditor.prototype.VersionBuild = '23959' ; FCKeditor.prototype.Create = function() { document.write( this.CreateHtml() ) ; } FCKeditor.prototype.CreateHtml = function() { // Check for errors if ( !this.InstanceName || this.InstanceName.length == 0 ) { this._ThrowError( 701, 'You must specify an instance name.' ) ; return '' ; } var sHtml = '' ; if ( !this.CheckBrowser || this._IsCompatibleBrowser() ) { sHtml += '<input type="hidden" id="' + this.InstanceName + '" name="' + this.InstanceName + '" value="' + this._HTMLEncode( this.Value ) + '" style="display:none" />' ; sHtml += this._GetConfigHtml() ; sHtml += 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' ; sHtml += '<textarea name="' + this.InstanceName + '" rows="4" cols="40" style="width:' + sWidth + ';height:' + sHeight ; if ( this.TabIndex ) sHtml += '" tabindex="' + this.TabIndex ; sHtml += '">' + this._HTMLEncode( this.Value ) + '<\/textarea>' ; } return sHtml ; } FCKeditor.prototype.ReplaceTextarea = function() { if ( document.getElementById( this.InstanceName + '___Frame' ) ) return ; if ( !this.CheckBrowser || this._IsCompatibleBrowser() ) { // We must check the elements firstly using the Id and then the name. var oTextarea = document.getElementById( this.InstanceName ) ; var colElementsByName = document.getElementsByName( this.InstanceName ) ; var i = 0; while ( oTextarea || i == 0 ) { if ( oTextarea && oTextarea.tagName.toLowerCase() == 'textarea' ) break ; oTextarea = colElementsByName[i++] ; } if ( !oTextarea ) { alert( 'Error: The TEXTAREA with id or name set to "' + this.InstanceName + '" was not found' ) ; return ; } oTextarea.style.display = 'none' ; if ( oTextarea.tabIndex ) this.TabIndex = oTextarea.tabIndex ; this._InsertHtmlBefore( this._GetConfigHtml(), oTextarea ) ; this._InsertHtmlBefore( this._GetIFrameHtml(), 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 += '&amp;' ; sConfig += encodeURIComponent( o ) + '=' + encodeURIComponent( this.Config[o] ) ; } return '<input type="hidden" id="' + this.InstanceName + '___Config" value="' + sConfig + '" style="display:none" />' ; } FCKeditor.prototype._GetIFrameHtml = function() { var sFile = 'fckeditor.html' ; try { if ( (/fcksource=true/i).test( window.top.location.search ) ) sFile = 'fckeditor.original.html' ; } catch (e) { /* Ignore it. Much probably we are inside a FRAME where the "top" is in another domain (security error). */ } var sLink = this.BasePath + 'editor/' + sFile + '?InstanceName=' + encodeURIComponent( this.InstanceName ) ; if (this.ToolbarSet) sLink += '&amp;Toolbar=' + this.ToolbarSet ; var html = '<iframe id="' + this.InstanceName + '___Frame" src="' + sLink + '" width="' + this.Width + '" height="' + this.Height ; if ( this.TabIndex ) html += '" tabindex="' + this.TabIndex ; html += '" frameborder="0" scrolling="no"></iframe>' ; return html ; } FCKeditor.prototype._IsCompatibleBrowser = function() { return FCKeditor_IsCompatibleBrowser() ; } 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, "&amp;").replace( /"/g, "&quot;").replace( /</g, "&lt;").replace( />/g, "&gt;") ; return text ; } ;(function() { var textareaToEditor = function( textarea ) { var editor = new FCKeditor( textarea.name ) ; editor.Width = Math.max( textarea.offsetWidth, FCKeditor.MinWidth ) ; editor.Height = Math.max( textarea.offsetHeight, FCKeditor.MinHeight ) ; return editor ; } /** * Replace all <textarea> elements available in the document with FCKeditor * instances. * * // Replace all <textarea> elements in the page. * FCKeditor.ReplaceAllTextareas() ; * * // Replace all <textarea class="myClassName"> elements in the page. * FCKeditor.ReplaceAllTextareas( 'myClassName' ) ; * * // Selectively replace <textarea> elements, based on custom assertions. * FCKeditor.ReplaceAllTextareas( function( textarea, editor ) * { * // Custom code to evaluate the replace, returning false if it * // must not be done. * // It also passes the "editor" parameter, so the developer can * // customize the instance. * } ) ; */ FCKeditor.ReplaceAllTextareas = function() { var textareas = document.getElementsByTagName( 'textarea' ) ; for ( var i = 0 ; i < textareas.length ; i++ ) { var editor = null ; var textarea = textareas[i] ; var name = textarea.name ; // The "name" attribute must exist. if ( !name || name.length == 0 ) continue ; if ( typeof arguments[0] == 'string' ) { // The textarea class name could be passed as the function // parameter. var classRegex = new RegExp( '(?:^| )' + arguments[0] + '(?:$| )' ) ; if ( !classRegex.test( textarea.className ) ) continue ; } else if ( typeof arguments[0] == 'function' ) { // An assertion function could be passed as the function parameter. // It must explicitly return "false" to ignore a specific <textarea>. editor = textareaToEditor( textarea ) ; if ( arguments[0]( textarea, editor ) === false ) continue ; } if ( !editor ) editor = textareaToEditor( textarea ) ; editor.ReplaceTextarea() ; } } })() ; function FCKeditor_IsCompatibleBrowser() { var sAgent = navigator.userAgent.toLowerCase() ; // Internet Explorer 5.5+ if ( /*@cc_on!@*/false && sAgent.indexOf("mac") == -1 ) { var sBrowserVersion = navigator.appVersion.match(/MSIE (.\..)/)[1] ; return ( sBrowserVersion >= 5.5 ) ; } // Gecko (Opera 9 tries to behave like Gecko at this point). if ( navigator.product == "Gecko" && navigator.productSub >= 20030210 && !( typeof(opera) == 'object' && opera.postError ) ) return true ; // Opera 9.50+ if ( window.opera && window.opera.version && parseFloat( window.opera.version() ) >= 9.5 ) return true ; // Adobe AIR // Checked before Safari because AIR have the WebKit rich text editor // features from Safari 3.0.4, but the version reported is 420. if ( sAgent.indexOf( ' adobeair/' ) != -1 ) return ( sAgent.match( / adobeair\/(\d+)/ )[1] >= 1 ) ; // Build must be at least v1 // Safari 3+ if ( sAgent.indexOf( ' applewebkit/' ) != -1 ) return ( sAgent.match( / applewebkit\/(\d+)/ )[1] >= 522 ) ; // Build must be at least 522 (v3) return false ; }
10npsite
trunk/guanli/system/fckeditor/fckeditor.js
JavaScript
asf20
9,606
/* * FCKeditor - The text editor for Internet - http://www.fckeditor.net * Copyright (C) 2003-2009 Frederico Caldeira Knabben * * == BEGIN LICENSE == * * Licensed under the terms of any of the following licenses at your * choice: * * - GNU General Public License Version 2 or later (the "GPL") * http://www.gnu.org/licenses/gpl.html * * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") * http://www.gnu.org/licenses/lgpl.html * * - Mozilla Public License Version 1.1 or later (the "MPL") * http://www.mozilla.org/MPL/MPL-1.1.html * * == END LICENSE == * * Editor configuration settings. * * Follow this link for more information: * http://docs.fckeditor.net/FCKeditor_2.x/Developers_Guide/Configuration/Configuration_Options */ FCKConfig.CustomConfigurationsPath = '' ; FCKConfig.EditorAreaCSS = FCKConfig.BasePath + 'css/fck_editorarea.css' ; FCKConfig.EditorAreaStyles = '' ; FCKConfig.ToolbarComboPreviewCSS = '' ; FCKConfig.DocType = '' ; FCKConfig.BaseHref = '' ; FCKConfig.FullPage = false ; // The following option determines whether the "Show Blocks" feature is enabled or not at startup. FCKConfig.StartupShowBlocks = false ; FCKConfig.Debug = false ; FCKConfig.AllowQueryStringDebug = true ; FCKConfig.SkinPath = FCKConfig.BasePath + 'skins/default/' ; FCKConfig.SkinEditorCSS = '' ; // FCKConfig.SkinPath + "|<minified css>" ; FCKConfig.SkinDialogCSS = '' ; // FCKConfig.SkinPath + "|<minified css>" ; FCKConfig.PreloadImages = [ FCKConfig.SkinPath + 'images/toolbar.start.gif', FCKConfig.SkinPath + 'images/toolbar.buttonarrow.gif' ] ; FCKConfig.PluginsPath = FCKConfig.BasePath + 'plugins/' ; // FCKConfig.Plugins.Add( 'autogrow' ) ; // FCKConfig.Plugins.Add( 'dragresizetable' ); FCKConfig.Plugins.Add( 'highlighter', 'zh-cn,en' ) ; FCKConfig.AutoGrowMax = 400 ; // FCKConfig.ProtectedSource.Add( /<%[\s\S]*?%>/g ) ; // ASP style server side code <%...%> // FCKConfig.ProtectedSource.Add( /<\?[\s\S]*?\?>/g ) ; // PHP style server side code // FCKConfig.ProtectedSource.Add( /(<asp:[^\>]+>[\s|\S]*?<\/asp:[^\>]+>)|(<asp:[^\>]+\/>)/gi ) ; // ASP.Net style tags <asp:control> FCKConfig.AutoDetectLanguage = true ; FCKConfig.DefaultLanguage = 'en' ; FCKConfig.ContentLangDirection = 'ltr' ; FCKConfig.ProcessHTMLEntities = true ; FCKConfig.IncludeLatinEntities = true ; FCKConfig.IncludeGreekEntities = true ; FCKConfig.ProcessNumericEntities = false ; FCKConfig.AdditionalNumericEntities = '' ; // Single Quote: "'" FCKConfig.FillEmptyBlocks = true ; FCKConfig.FormatSource = true ; FCKConfig.FormatOutput = true ; FCKConfig.FormatIndentator = ' ' ; FCKConfig.EMailProtection = 'none' ; // none | encode | function FCKConfig.EMailProtectionFunction = 'mt(NAME,DOMAIN,SUBJECT,BODY)' ; FCKConfig.StartupFocus = false ; FCKConfig.ForcePasteAsPlainText = false ; FCKConfig.AutoDetectPasteFromWord = true ; // IE only. FCKConfig.ShowDropDialog = true ; FCKConfig.ForceSimpleAmpersand = false ; FCKConfig.TabSpaces = 0 ; FCKConfig.ShowBorders = true ; FCKConfig.SourcePopup = false ; FCKConfig.ToolbarStartExpanded = true ; FCKConfig.ToolbarCanCollapse = true ; FCKConfig.IgnoreEmptyParagraphValue = true ; FCKConfig.FloatingPanelsZIndex = 10000 ; FCKConfig.HtmlEncodeOutput = false ; FCKConfig.TemplateReplaceAll = true ; FCKConfig.TemplateReplaceCheckbox = true ; FCKConfig.ToolbarLocation = 'In' ; FCKConfig.ToolbarSets["Default"] = [ ['Source','DocProps','-','Save','NewPage','Preview','-','Templates'], ['Cut','Copy','Paste','PasteText','PasteWord','-','Print','SpellCheck'], ['Undo','Redo','-','Find','Replace','-','SelectAll','RemoveFormat'], ['Form','Checkbox','Radio','TextField','Textarea','Select','Button','ImageButton','HiddenField'], '/', ['Bold','Italic','Underline','StrikeThrough','-','Subscript','Superscript'], ['OrderedList','UnorderedList','-','Outdent','Indent','Blockquote','CreateDiv'], ['JustifyLeft','JustifyCenter','JustifyRight','JustifyFull'], ['Link','Unlink','Anchor'], ['Image','Flash','Table','Rule','Smiley','SpecialChar','PageBreak'], '/', ['Style','FontFormat','FontName','FontSize'], ['TextColor','BGColor'], ['FitWindow','ShowBlocks','-','About'],['HighLighter'] // No comma for the last row. ] ; FCKConfig.ToolbarSets["Basic"] = [ ['Bold','Italic','-','OrderedList','UnorderedList','-','Link','Unlink','-','About'] ] ; FCKConfig.EnterMode = 'p' ; // p | div | br FCKConfig.ShiftEnterMode = 'br' ; // p | div | br FCKConfig.Keystrokes = [ [ CTRL + 65 /*A*/, true ], [ CTRL + 67 /*C*/, true ], [ CTRL + 70 /*F*/, true ], [ CTRL + 83 /*S*/, true ], [ CTRL + 84 /*T*/, true ], [ CTRL + 88 /*X*/, true ], [ CTRL + 86 /*V*/, 'Paste' ], [ CTRL + 45 /*INS*/, true ], [ SHIFT + 45 /*INS*/, 'Paste' ], [ CTRL + 88 /*X*/, 'Cut' ], [ SHIFT + 46 /*DEL*/, 'Cut' ], [ CTRL + 90 /*Z*/, 'Undo' ], [ CTRL + 89 /*Y*/, 'Redo' ], [ CTRL + SHIFT + 90 /*Z*/, 'Redo' ], [ CTRL + 76 /*L*/, 'Link' ], [ CTRL + 66 /*B*/, 'Bold' ], [ CTRL + 73 /*I*/, 'Italic' ], [ CTRL + 85 /*U*/, 'Underline' ], [ CTRL + SHIFT + 83 /*S*/, 'Save' ], [ CTRL + ALT + 13 /*ENTER*/, 'FitWindow' ], [ SHIFT + 32 /*SPACE*/, 'Nbsp' ] ] ; FCKConfig.ContextMenu = ['Generic','Link','Anchor','Image','Flash','Select','Textarea','Checkbox','Radio','TextField','HiddenField','ImageButton','Button','BulletedList','NumberedList','Table','Form','DivContainer'] ; FCKConfig.BrowserContextMenuOnCtrl = false ; FCKConfig.BrowserContextMenu = false ; FCKConfig.EnableMoreFontColors = true ; 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.FontFormats = 'p;h1;h2;h3;h4;h5;h6;pre;address;div' ; FCKConfig.FontNames = 'Arial;Comic Sans MS;Courier New;Tahoma;Times New Roman;Verdana' ; FCKConfig.FontSizes = 'smaller;larger;xx-small;x-small;small;medium;large;x-large;xx-large' ; FCKConfig.StylesXmlPath = FCKConfig.EditorPath + 'fckstyles.xml' ; FCKConfig.TemplatesXmlPath = FCKConfig.EditorPath + 'fcktemplates.xml' ; FCKConfig.SpellChecker = 'WSC' ; // 'WSC' | 'SCAYT' | 'SpellerPages' | 'ieSpell' FCKConfig.IeSpellDownloadUrl = 'http://www.iespell.com/download.php' ; FCKConfig.SpellerPagesServerScript = 'server-scripts/spellchecker.php' ; // Available extension: .php .cfm .pl FCKConfig.FirefoxSpellChecker = false ; FCKConfig.MaxUndoLevels = 15 ; FCKConfig.DisableObjectResizing = false ; FCKConfig.DisableFFTableHandles = true ; FCKConfig.LinkDlgHideTarget = false ; FCKConfig.LinkDlgHideAdvanced = false ; FCKConfig.ImageDlgHideLink = false ; FCKConfig.ImageDlgHideAdvanced = false ; FCKConfig.FlashDlgHideAdvanced = false ; FCKConfig.ProtectedTags = '' ; // This will be applied to the body element of the editor FCKConfig.BodyId = '' ; FCKConfig.BodyClass = '' ; FCKConfig.DefaultStyleLabel = '' ; FCKConfig.DefaultFontFormatLabel = '' ; FCKConfig.DefaultFontLabel = '' ; FCKConfig.DefaultFontSizeLabel = '' ; FCKConfig.DefaultLinkTarget = '' ; // The option switches between trying to keep the html structure or do the changes so the content looks like it was in Word FCKConfig.CleanWordKeepsStructure = false ; // Only inline elements are valid. FCKConfig.RemoveFormatTags = 'b,big,code,del,dfn,em,font,i,ins,kbd,q,samp,small,span,strike,strong,sub,sup,tt,u,var' ; // Attributes that will be removed FCKConfig.RemoveAttributes = 'class,style,lang,width,height,align,hspace,valign' ; FCKConfig.CustomStyles = { 'Red Title' : { Element : 'h3', Styles : { 'color' : 'Red' } } }; // Do not add, rename or remove styles here. Only apply definition changes. FCKConfig.CoreStyles = { // Basic Inline Styles. 'Bold' : { Element : 'strong', Overrides : 'b' }, 'Italic' : { Element : 'em', Overrides : 'i' }, 'Underline' : { Element : 'u' }, 'StrikeThrough' : { Element : 'strike' }, 'Subscript' : { Element : 'sub' }, 'Superscript' : { Element : 'sup' }, // Basic Block Styles (Font Format Combo). 'p' : { Element : 'p' }, 'div' : { Element : 'div' }, 'pre' : { Element : 'pre' }, 'address' : { Element : 'address' }, 'h1' : { Element : 'h1' }, 'h2' : { Element : 'h2' }, 'h3' : { Element : 'h3' }, 'h4' : { Element : 'h4' }, 'h5' : { Element : 'h5' }, 'h6' : { Element : 'h6' }, // Other formatting features. 'FontFace' : { Element : 'span', Styles : { 'font-family' : '#("Font")' }, Overrides : [ { Element : 'font', Attributes : { 'face' : null } } ] }, 'Size' : { Element : 'span', Styles : { 'font-size' : '#("Size","fontSize")' }, Overrides : [ { Element : 'font', Attributes : { 'size' : null } } ] }, 'Color' : { Element : 'span', Styles : { 'color' : '#("Color","color")' }, Overrides : [ { Element : 'font', Attributes : { 'color' : null } } ] }, 'BackColor' : { Element : 'span', Styles : { 'background-color' : '#("Color","color")' } }, 'SelectionHighlight' : { Element : 'span', Styles : { 'background-color' : 'navy', 'color' : 'white' } } }; // The distance of an indentation step. FCKConfig.IndentLength = 40 ; FCKConfig.IndentUnit = 'px' ; // Alternatively, FCKeditor allows the use of CSS classes for block indentation. // This overrides the IndentLength/IndentUnit settings. FCKConfig.IndentClasses = [] ; // [ Left, Center, Right, Justified ] FCKConfig.JustifyClasses = [] ; // The following value defines which File Browser connector and Quick Upload // "uploader" to use. It is valid for the default implementaion and it is here // just to make this configuration file cleaner. // It is not possible to change this value using an external file or even // inline when creating the editor instance. In that cases you must set the // values of LinkBrowserURL, ImageBrowserURL and so on. // Custom implementations should just ignore it. var _FileBrowserLanguage = 'php' ; // asp | aspx | cfm | lasso | perl | php | py var _QuickUploadLanguage = 'php' ; // asp | aspx | cfm | lasso | perl | php | py // Don't care about the following two lines. It just calculates the correct connector // extension to use for the default File Browser (Perl uses "cgi"). var _FileBrowserExtension = _FileBrowserLanguage == 'perl' ? 'cgi' : _FileBrowserLanguage ; var _QuickUploadExtension = _QuickUploadLanguage == 'perl' ? 'cgi' : _QuickUploadLanguage ; FCKConfig.LinkBrowser = true ; FCKConfig.LinkBrowserURL = FCKConfig.BasePath + 'filemanager/browser/default/browser.html?Connector=' + encodeURIComponent( FCKConfig.BasePath + 'filemanager/connectors/' + _FileBrowserLanguage + '/connector.' + _FileBrowserExtension ) ; FCKConfig.LinkBrowserWindowWidth = FCKConfig.ScreenWidth * 0.7 ; // 70% FCKConfig.LinkBrowserWindowHeight = FCKConfig.ScreenHeight * 0.7 ; // 70% FCKConfig.ImageBrowser = true ; FCKConfig.ImageBrowserURL = FCKConfig.BasePath + 'filemanager/browser/default/browser.html?Type=Image&Connector=' + encodeURIComponent( FCKConfig.BasePath + 'filemanager/connectors/' + _FileBrowserLanguage + '/connector.' + _FileBrowserExtension ) ; FCKConfig.ImageBrowserWindowWidth = FCKConfig.ScreenWidth * 0.7 ; // 70% ; FCKConfig.ImageBrowserWindowHeight = FCKConfig.ScreenHeight * 0.7 ; // 70% ; FCKConfig.FlashBrowser = true ; FCKConfig.FlashBrowserURL = FCKConfig.BasePath + 'filemanager/browser/default/browser.html?Type=Flash&Connector=' + encodeURIComponent( FCKConfig.BasePath + 'filemanager/connectors/' + _FileBrowserLanguage + '/connector.' + _FileBrowserExtension ) ; FCKConfig.FlashBrowserWindowWidth = FCKConfig.ScreenWidth * 0.7 ; //70% ; FCKConfig.FlashBrowserWindowHeight = FCKConfig.ScreenHeight * 0.7 ; //70% ; FCKConfig.LinkUpload = true ; FCKConfig.LinkUploadURL = FCKConfig.BasePath + 'filemanager/connectors/' + _QuickUploadLanguage + '/upload.' + _QuickUploadExtension ; FCKConfig.LinkUploadAllowedExtensions = ".(7z|aiff|asf|avi|bmp|csv|doc|fla|flv|gif|gz|gzip|jpeg|jpg|mid|mov|mp3|mp4|mpc|mpeg|mpg|ods|odt|pdf|png|ppt|pxd|qt|ram|rar|rm|rmi|rmvb|rtf|sdc|sitd|swf|sxc|sxw|tar|tgz|tif|tiff|txt|vsd|wav|wma|wmv|xls|xml|zip)$" ; // empty for all FCKConfig.LinkUploadDeniedExtensions = "" ; // empty for no one FCKConfig.ImageUpload = true ; FCKConfig.ImageUploadURL = FCKConfig.BasePath + 'filemanager/connectors/' + _QuickUploadLanguage + '/upload.' + _QuickUploadExtension + '?Type=Image' ; FCKConfig.ImageUploadAllowedExtensions = ".(jpg|gif|jpeg|png|bmp)$" ; // empty for all FCKConfig.ImageUploadDeniedExtensions = "" ; // empty for no one FCKConfig.FlashUpload = true ; FCKConfig.FlashUploadURL = FCKConfig.BasePath + 'filemanager/connectors/' + _QuickUploadLanguage + '/upload.' + _QuickUploadExtension + '?Type=Flash' ; FCKConfig.FlashUploadAllowedExtensions = ".(swf|flv)$" ; // empty for all FCKConfig.FlashUploadDeniedExtensions = "" ; // empty for no one 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 = 210 ; FCKConfig.BackgroundBlockerColor = '#ffffff' ; FCKConfig.BackgroundBlockerOpacity = 0.50 ; FCKConfig.MsWebBrowserControlCompat = false ; FCKConfig.PreventSubmitHandler = false ;
10npsite
trunk/guanli/system/fckeditor/fckconfig.js
JavaScript
asf20
14,009
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <!-- * FCKeditor - The text editor for Internet - http://www.fckeditor.net * Copyright (C) 2003-2009 Frederico Caldeira Knabben * * == BEGIN LICENSE == * * Licensed under the terms of any of the following licenses at your * choice: * * - GNU General Public License Version 2 or later (the "GPL") * http://www.gnu.org/licenses/gpl.html * * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") * http://www.gnu.org/licenses/lgpl.html * * - Mozilla Public License Version 1.1 or later (the "MPL") * http://www.mozilla.org/MPL/MPL-1.1.html * * == END LICENSE == --> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>FCKeditor - Documentation</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <style type="text/css"> body { font-family: arial, verdana, sans-serif } p { margin-left: 20px } </style> </head> <body> <h1> FCKeditor Documentation</h1> <p> You can find the official documentation for FCKeditor online, at <a href="http://docs.fckeditor.net/"> http://docs.fckeditor.net/</a>.</p> </body> </html>
10npsite
trunk/guanli/system/fckeditor/_documentation.html
HTML
asf20
1,262
<?php /* * FCKeditor - The text editor for Internet - http://www.fckeditor.net * Copyright (C) 2003-2009 Frederico Caldeira Knabben * * == BEGIN LICENSE == * * Licensed under the terms of any of the following licenses at your * choice: * * - GNU General Public License Version 2 or later (the "GPL") * http://www.gnu.org/licenses/gpl.html * * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") * http://www.gnu.org/licenses/lgpl.html * * - Mozilla Public License Version 1.1 or later (the "MPL") * http://www.mozilla.org/MPL/MPL-1.1.html * * == END LICENSE == * * This is the integration file for PHP (All versions). * * It loads the correct integration file based on the PHP version (avoiding * strict error messages with PHP 5). */ if ( !function_exists('version_compare') || version_compare( phpversion(), '5', '<' ) ) include_once( 'fckeditor_php4.php' ) ; else include_once( 'fckeditor_php5.php' ) ;
10npsite
trunk/guanli/system/fckeditor/fckeditor.php
PHP
asf20
994
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <!-- * FCKeditor - The text editor for Internet - http://www.fckeditor.net * Copyright (C) 2003-2009 Frederico Caldeira Knabben * * == BEGIN LICENSE == * * Licensed under the terms of any of the following licenses at your * choice: * * - GNU General Public License Version 2 or later (the "GPL") * http://www.gnu.org/licenses/gpl.html * * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") * http://www.gnu.org/licenses/lgpl.html * * - Mozilla Public License Version 1.1 or later (the "MPL") * http://www.mozilla.org/MPL/MPL-1.1.html * * == END LICENSE == --> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>FCKeditor ChangeLog - What's New?</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <style type="text/css"> body { font-family: arial, verdana, sans-serif } p { margin-left: 20px } h1 { border-bottom: solid 1px gray; padding-bottom: 20px } </style> </head> <body> <h1> FCKeditor ChangeLog - What's New?</h1> <h3> Version 2.6.5</h3> <p> New Features and Improvements:</p> <ul> <li>Introduced the Spell Check As You Type (SCAYT) spell checking option.</li> </ul> <p> Fixed Bugs:</p> <ul> <li><strong>Security release, upgrade is highly recommended</strong> (fixed security issues in ASP and ColdFusion scripts). </li> <li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/2856">#2856</a>] Fixed problem with inches in paste dialog.</li> <li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/3120">#3120</a>] # (pound sign) is not correctly escaped in file urls.</li> <li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/2915">#2915</a>] About plugin shows misleading user language.</li> <li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/2821">#2821</a>] Configuration items that used floating point numbers were parsed as integers.</li> <li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/2604">#2064</a>] The asp connector didn't work correctly in windows 2000 servers.</li> <li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/3429">#3429</a>] Fixed problem in IE8 with XHTML doctype. Thanks to duncansimey.</li> <li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/3446">#3446</a>] Fixed self-closed &lt;option&gt; in the table cell dialog.</li> <li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/3181">#3181</a>] Node selection could raise an error in IE8.</li> <li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/2156">#2156</a>] After calling GetData() the style removal operations didn't work in IE. Thanks to Compendium Blogware.</li> <li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/3427">#3427</a>] Improved compatibility of Document properties dialog with Eclipse.</li> <li>Language file updates for the following languages: <ul> <li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/2908">#2908</a>] Czech </li> <li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/2849">#2849</a>] Lithuanian</li> <li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/3636">#3636</a>] Polish</li> <li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/3741">#3741</a>] Korean</li> <li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/2861">#2861</a>] Slovenian</li> </ul> </li> <li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/3439">#3439</a>] IgnoreEmptyParagraphValue had no effect if ProcessHTMLEntities is false.</li> <li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/3880">#3880</a>] Fixed some minor logical and typing mistakes in fckdomrange_ie.js.</li> <li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/2689">#2689</a>] If a custom connector tried to use the "url" attribute for files it was always reencoded.</li> <li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1537">#1537</a>] Fixed extra &lt;p&gt; tag added before pasted contents from Paste From Word dialog.</li> <li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/2874">#2874</a>] Fixed wrong position of caption tag in tables with table headers.</li> <li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/3818">#3818</a>] Fixed layout error in text and background color popups when more colors button is disabled.</li> <li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/3481">#3481</a>] Fixed an issue in WebKit where paste actions inside table cells may leak outside of the table cell.</li> <li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/3677">#3677</a>] Fixed JavaScript error when trying to create link for images inside floating div containers.</li> <li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/3925">#3925</a>] Removed obsolete parentWindow reference from FCKDialog.OpenDialog().</li> <li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/2936">#2936</a>] Added protection in the PHP upload if the destination folder is placed at the root and doesn't exit.</li> <li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/4357">#4357</a>] Avoid problem in the paste dialog if IIS is set to process HTML files as Asp.</li> <li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/2201">#2201</a>] Fixed a crash in IE in an object is selected (with handles) on unload of the editor.</li> <li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/3053">#3053</a>] Fixed problems with the height of the content area in Safari and Chrome.</li> </ul> <p> <a href="_whatsnew_history.html">See previous versions history</a></p> </body> </html>
10npsite
trunk/guanli/system/fckeditor/_whatsnew.html
HTML
asf20
5,992
<cfcomponent output="false" displayname="FCKeditor" hint="Create an instance of the FCKeditor."> <!--- * FCKeditor - The text editor for Internet - http://www.fckeditor.net * Copyright (C) 2003-2009 Frederico Caldeira Knabben * * == BEGIN LICENSE == * * Licensed under the terms of any of the following licenses at your * choice: * * - GNU General Public License Version 2 or later (the "GPL") * http://www.gnu.org/licenses/gpl.html * * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") * http://www.gnu.org/licenses/lgpl.html * * - Mozilla Public License Version 1.1 or later (the "MPL") * http://www.mozilla.org/MPL/MPL-1.1.html * * == END LICENSE == * * ColdFusion MX integration. * Note this CFC is created for use only with Coldfusion MX and above. * For older version, check the fckeditor.cfm. * * Syntax: * * <cfscript> * fckEditor = createObject("component", "fckeditor.fckeditor"); * fckEditor.instanceName="myEditor"; * fckEditor.basePath="/fckeditor/"; * fckEditor.value="<p>This is my <strong>initial</strong> html text.</p>"; * fckEditor.width="100%"; * fckEditor.height="200"; * // ... additional parameters ... * fckEditor.create(); // create instance now. * </cfscript> * * See your macromedia coldfusion mx documentation for more info. * * *** Note: * Do not use path names with a "." (dot) in the name. This is a coldfusion * limitation with the cfc invocation. ---> <cfinclude template="fckutils.cfm"> <cffunction name="Create" access="public" output="true" returntype="void" hint="Outputs the editor HTML in the place where the function is called" > <cfoutput>#CreateHtml()#</cfoutput> </cffunction> <cffunction name="CreateHtml" access="public" output="false" returntype="string" hint="Retrieves the editor HTML" > <cfparam name="this.instanceName" type="string" /> <cfparam name="this.width" type="string" default="100%" /> <cfparam name="this.height" type="string" default="200" /> <cfparam name="this.toolbarSet" type="string" default="Default" /> <cfparam name="this.value" type="string" default="" /> <cfparam name="this.basePath" type="string" default="/fckeditor/" /> <cfparam name="this.checkBrowser" type="boolean" default="true" /> <cfparam name="this.config" type="struct" default="#structNew()#" /> <cfscript> // display the html editor or a plain textarea? if( isCompatible() ) return getHtmlEditor(); else return getTextArea(); </cfscript> </cffunction> <cffunction name="isCompatible" access="private" output="false" returnType="boolean" hint="Check browser compatibility via HTTP_USER_AGENT, if checkBrowser is true" > <cfscript> var sAgent = lCase( cgi.HTTP_USER_AGENT ); var stResult = ""; var sBrowserVersion = ""; // do not check if argument "checkBrowser" is false if( not this.checkBrowser ) return true; return FCKeditor_IsCompatibleBrowser(); </cfscript> </cffunction> <cffunction name="getTextArea" access="private" output="false" returnType="string" hint="Create a textarea field for non-compatible browsers." > <cfset var result = "" /> <cfset var sWidthCSS = "" /> <cfset var sHeightCSS = "" /> <cfscript> if( Find( "%", this.width ) gt 0) sWidthCSS = this.width; else sWidthCSS = this.width & "px"; if( Find( "%", this.width ) gt 0) sHeightCSS = this.height; else sHeightCSS = this.height & "px"; result = "<textarea name=""#this.instanceName#"" rows=""4"" cols=""40"" style=""width: #sWidthCSS#; height: #sHeightCSS#"">#HTMLEditFormat(this.value)#</textarea>" & chr(13) & chr(10); </cfscript> <cfreturn result /> </cffunction> <cffunction name="getHtmlEditor" access="private" output="false" returnType="string" hint="Create the html editor instance for compatible browsers." > <cfset var sURL = "" /> <cfset var result = "" /> <cfscript> // try to fix the basePath, if ending slash is missing if( len( this.basePath) and right( this.basePath, 1 ) is not "/" ) this.basePath = this.basePath & "/"; // construct the url sURL = this.basePath & "editor/fckeditor.html?InstanceName=" & this.instanceName; // append toolbarset name to the url if( len( this.toolbarSet ) ) sURL = sURL & "&amp;Toolbar=" & this.toolbarSet; </cfscript> <cfscript> result = result & "<input type=""hidden"" id=""#this.instanceName#"" name=""#this.instanceName#"" value=""#HTMLEditFormat(this.value)#"" style=""display:none"" />" & chr(13) & chr(10); result = result & "<input type=""hidden"" id=""#this.instanceName#___Config"" value=""#GetConfigFieldString()#"" style=""display:none"" />" & chr(13) & chr(10); result = result & "<iframe id=""#this.instanceName#___Frame"" src=""#sURL#"" width=""#this.width#"" height=""#this.height#"" frameborder=""0"" scrolling=""no""></iframe>" & chr(13) & chr(10); </cfscript> <cfreturn result /> </cffunction> <cffunction name="GetConfigFieldString" access="private" output="false" returnType="string" hint="Create configuration string: Key1=Value1&Key2=Value2&... (Key/Value:HTML encoded)" > <cfset var sParams = "" /> <cfset var key = "" /> <cfset var fieldValue = "" /> <cfset var fieldLabel = "" /> <cfset var lConfigKeys = "" /> <cfset var iPos = "" /> <cfscript> /** * CFML doesn't store casesensitive names for structure keys, but the configuration names must be casesensitive for js. * So we need to find out the correct case for the configuration keys. * We "fix" this by comparing the caseless configuration keys to a list of all available configuration options in the correct case. * changed 20041206 hk@lwd.de (improvements are welcome!) */ lConfigKeys = lConfigKeys & "CustomConfigurationsPath,EditorAreaCSS,ToolbarComboPreviewCSS,DocType"; lConfigKeys = lConfigKeys & ",BaseHref,FullPage,Debug,AllowQueryStringDebug,SkinPath"; lConfigKeys = lConfigKeys & ",PreloadImages,PluginsPath,AutoDetectLanguage,DefaultLanguage,ContentLangDirection"; lConfigKeys = lConfigKeys & ",ProcessHTMLEntities,IncludeLatinEntities,IncludeGreekEntities,ProcessNumericEntities,AdditionalNumericEntities"; lConfigKeys = lConfigKeys & ",FillEmptyBlocks,FormatSource,FormatOutput,FormatIndentator"; lConfigKeys = lConfigKeys & ",StartupFocus,ForcePasteAsPlainText,AutoDetectPasteFromWord,ForceSimpleAmpersand"; lConfigKeys = lConfigKeys & ",TabSpaces,ShowBorders,SourcePopup,ToolbarStartExpanded,ToolbarCanCollapse"; lConfigKeys = lConfigKeys & ",IgnoreEmptyParagraphValue,FloatingPanelsZIndex,TemplateReplaceAll,TemplateReplaceCheckbox"; lConfigKeys = lConfigKeys & ",ToolbarLocation,ToolbarSets,EnterMode,ShiftEnterMode,Keystrokes"; lConfigKeys = lConfigKeys & ",ContextMenu,BrowserContextMenuOnCtrl,FontColors,FontNames,FontSizes"; lConfigKeys = lConfigKeys & ",FontFormats,StylesXmlPath,TemplatesXmlPath,SpellChecker,IeSpellDownloadUrl"; lConfigKeys = lConfigKeys & ",SpellerPagesServerScript,FirefoxSpellChecker,MaxUndoLevels,DisableObjectResizing,DisableFFTableHandles"; lConfigKeys = lConfigKeys & ",LinkDlgHideTarget,LinkDlgHideAdvanced,ImageDlgHideLink,ImageDlgHideAdvanced,FlashDlgHideAdvanced"; lConfigKeys = lConfigKeys & ",ProtectedTags,BodyId,BodyClass,DefaultLinkTarget,CleanWordKeepsStructure"; lConfigKeys = lConfigKeys & ",LinkBrowser,LinkBrowserURL,LinkBrowserWindowWidth,LinkBrowserWindowHeight,ImageBrowser"; lConfigKeys = lConfigKeys & ",ImageBrowserURL,ImageBrowserWindowWidth,ImageBrowserWindowHeight,FlashBrowser,FlashBrowserURL"; lConfigKeys = lConfigKeys & ",FlashBrowserWindowWidth,FlashBrowserWindowHeight,LinkUpload,LinkUploadURL,LinkUploadWindowWidth"; lConfigKeys = lConfigKeys & ",LinkUploadWindowHeight,LinkUploadAllowedExtensions,LinkUploadDeniedExtensions,ImageUpload,ImageUploadURL"; lConfigKeys = lConfigKeys & ",ImageUploadAllowedExtensions,ImageUploadDeniedExtensions,FlashUpload,FlashUploadURL,FlashUploadAllowedExtensions"; lConfigKeys = lConfigKeys & ",FlashUploadDeniedExtensions,SmileyPath,SmileyImages,SmileyColumns,SmileyWindowWidth,SmileyWindowHeight"; for( key in this.config ) { iPos = listFindNoCase( lConfigKeys, key ); if( iPos GT 0 ) { if( len( sParams ) ) sParams = sParams & "&amp;"; fieldValue = this.config[key]; fieldName = listGetAt( lConfigKeys, iPos ); // set all boolean possibilities in CFML to true/false values if( isBoolean( fieldValue) and fieldValue ) fieldValue = "true"; else if( isBoolean( fieldValue) ) fieldValue = "false"; sParams = sParams & HTMLEditFormat( fieldName ) & '=' & HTMLEditFormat( fieldValue ); } } return sParams; </cfscript> </cffunction> </cfcomponent>
10npsite
trunk/guanli/system/fckeditor/fckeditor.cfc
ColdFusion CFC
asf20
8,830
##### # FCKeditor - The text editor for Internet - http://www.fckeditor.net # Copyright (C) 2003-2009 Frederico Caldeira Knabben # # == BEGIN LICENSE == # # Licensed under the terms of any of the following licenses at your # choice: # # - GNU General Public License Version 2 or later (the "GPL") # http://www.gnu.org/licenses/gpl.html # # - GNU Lesser General Public License Version 2.1 or later (the "LGPL") # http://www.gnu.org/licenses/lgpl.html # # - Mozilla Public License Version 1.1 or later (the "MPL") # http://www.mozilla.org/MPL/MPL-1.1.html # # == END LICENSE == # # This is the integration file for Perl. ##### #my $InstanceName; #my $BasePath; #my $Width; #my $Height; #my $ToolbarSet; #my $Value; #my %Config; sub FCKeditor { local($instanceName) = @_; $InstanceName = $instanceName; $BasePath = '/fckeditor/'; $Width = '100%'; $Height = '200'; $ToolbarSet = 'Default'; $Value = ''; } sub Create { print &CreateHtml(); } sub specialchar_cnv { local($ch) = @_; $ch =~ s/&/&amp;/g; # & $ch =~ s/\"/&quot;/g; #" $ch =~ s/\'/&#39;/g; # ' $ch =~ s/</&lt;/g; # < $ch =~ s/>/&gt;/g; # > return($ch); } sub CreateHtml { $HtmlValue = &specialchar_cnv($Value); $Html = '' ; if(&IsCompatible()) { $Link = $BasePath . "editor/fckeditor.html?InstanceName=$InstanceName"; if($ToolbarSet ne '') { $Link .= "&amp;Toolbar=$ToolbarSet"; } #// Render the linked hidden field. $Html .= "<input type=\"hidden\" id=\"$InstanceName\" name=\"$InstanceName\" value=\"$HtmlValue\" style=\"display:none\" />" ; #// Render the configurations hidden field. $cfgstr = &GetConfigFieldString(); $wk = $InstanceName."___Config"; $Html .= "<input type=\"hidden\" id=\"$wk\" value=\"$cfgstr\" style=\"display:none\" />" ; #// Render the editor IFRAME. $wk = $InstanceName."___Frame"; $Html .= "<iframe id=\"$wk\" src=\"$Link\" width=\"$Width\" height=\"$Height\" frameborder=\"0\" scrolling=\"no\"></iframe>"; } else { if($Width =~ /\%/g){ $WidthCSS = $Width; } else { $WidthCSS = $Width . 'px'; } if($Height =~ /\%/g){ $HeightCSS = $Height; } else { $HeightCSS = $Height . 'px'; } $Html .= "<textarea name=\"$InstanceName\" rows=\"4\" cols=\"40\" style=\"width: $WidthCSS; height: $HeightCSS\">$HtmlValue</textarea>"; } return($Html); } sub IsCompatible { $sAgent = $ENV{'HTTP_USER_AGENT'}; if(($sAgent =~ /MSIE/i) && !($sAgent =~ /mac/i) && !($sAgent =~ /Opera/i)) { $iVersion = substr($sAgent,index($sAgent,'MSIE') + 5,3); return($iVersion >= 5.5) ; } elsif($sAgent =~ /Gecko\//i) { $iVersion = substr($sAgent,index($sAgent,'Gecko/') + 6,8); return($iVersion >= 20030210) ; } elsif($sAgent =~ /Opera\//i) { $iVersion = substr($sAgent,index($sAgent,'Opera/') + 6,4); return($iVersion >= 9.5) ; } elsif($sAgent =~ /AppleWebKit\/(\d+)/i) { return($1 >= 522) ; } else { return(0); # 2.0 PR fix } } sub GetConfigFieldString { $sParams = ''; $bFirst = 0; foreach $sKey (keys %Config) { $sValue = $Config{$sKey}; if($bFirst == 1) { $sParams .= '&amp;'; } else { $bFirst = 1; } $k = &specialchar_cnv($sKey); $v = &specialchar_cnv($sValue); if($sValue eq "true") { $sParams .= "$k=true"; } elsif($sValue eq "false") { $sParams .= "$k=false"; } else { $sParams .= "$k=$v"; } } return($sParams); } 1;
10npsite
trunk/guanli/system/fckeditor/fckeditor.pl
Perl
asf20
3,506
<!--- /* * FCKeditor - The text editor for Internet - http://www.fckeditor.net * Copyright (C) 2003-2009 Frederico Caldeira Knabben * * == BEGIN LICENSE == * * Licensed under the terms of any of the following licenses at your * choice: * * - GNU General Public License Version 2 or later (the "GPL") * http://www.gnu.org/licenses/gpl.html * * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") * http://www.gnu.org/licenses/lgpl.html * * - Mozilla Public License Version 1.1 or later (the "MPL") * http://www.mozilla.org/MPL/MPL-1.1.html * * == END LICENSE == * * This page lists the data posted by a form. */ ---> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html> <head> <title>FCKeditor - Samples - Posted Data</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <meta name="robots" content="noindex, nofollow"> <link href="../sample.css" rel="stylesheet" type="text/css" /> </head> <body> <h1>FCKeditor - Samples - Posted Data</h1> This page lists all data posted by the form. <hr> <cfif isDefined( 'FORM.fieldnames' )> <cfoutput> <hr /> <table border="1" cellspacing="0" id="outputSample"> <colgroup><col width="80"><col></colgroup> <thead> <tr> <th>Field Name</th> <th>Value</th> </tr> </thead> <tr> <th>FieldNames</th> <td>#HTMLEditFormat( FORM.fieldNames )#</td> </tr> <cfloop list="#FORM.fieldnames#" index="key"> <tr> <th>#HTMLEditFormat( key )#</th> <td><pre> <cftry> <cfif isDefined( 'FORM.' & #key# ) and REFindNoCase("^[a-z0-9]+$", key)> #HTMLEditFormat( evaluate( "FORM.#key#" ) )# </cfif> <cfcatch type="any"> </cfcatch> </cftry> </pre></td> </tr> </cfloop> </table> </cfoutput> </cfif> </body> </html>
10npsite
trunk/guanli/system/fckeditor/_samples/cfm/sampleposteddata.cfm
ColdFusion
asf20
1,898
<cfsetting enablecfoutputonly="true"> <!--- * FCKeditor - The text editor for Internet - http://www.fckeditor.net * Copyright (C) 2003-2009 Frederico Caldeira Knabben * * == BEGIN LICENSE == * * Licensed under the terms of any of the following licenses at your * choice: * * - GNU General Public License Version 2 or later (the "GPL") * http://www.gnu.org/licenses/gpl.html * * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") * http://www.gnu.org/licenses/lgpl.html * * - Mozilla Public License Version 1.1 or later (the "MPL") * http://www.mozilla.org/MPL/MPL-1.1.html * * == END LICENSE == * * Sample page for ColdFusion. ---> <cfoutput> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <title>FCKeditor - Sample</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <meta name="robots" content="noindex, nofollow"> <link href="../sample.css" rel="stylesheet" type="text/css" /> <script type="text/javascript"> function FCKeditor_OnComplete( editorInstance ) { var oCombo = document.getElementById( 'cmbLanguages' ) ; for ( code in editorInstance.Language.AvailableLanguages ) { AddComboOption( oCombo, editorInstance.Language.AvailableLanguages[code] + ' (' + code + ')', code ) ; } oCombo.value = editorInstance.Language.ActiveLanguage.Code ; } function AddComboOption(combo, optionText, optionValue) { var oOption = document.createElement("OPTION") ; combo.options.add(oOption) ; oOption.innerHTML = optionText ; oOption.value = optionValue ; return oOption ; } function ChangeLanguage( languageCode ) { window.location.href = window.location.pathname + "?Lang=" + languageCode ; } </script> </head> <body> <h1>FCKeditor - ColdFusion - Sample 2</h1> This sample shows the editor in all its available languages. <hr> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td> Select a language:&nbsp; </td> <td> <select id="cmbLanguages" onchange="ChangeLanguage(this.value);"> </select> </td> </tr> </table> <br> <form action="sampleposteddata.cfm" method="post" target="_blank"> </cfoutput> <cfset config = structNew()> <cfif isDefined( "URL.Lang" )> <cfset config["AutoDetectLanguage"] = false> <cfset config["DefaultLanguage"] = REReplaceNoCase( URL.Lang, "[^a-z\-]", "", "all" )> <cfelse> <cfset config["AutoDetectLanguage"] = true> <cfset config["DefaultLanguage"] = 'en'> </cfif> <!--- Calculate basepath for FCKeditor. It's in the folder right above _samples ---> <cfset basePath = Left( cgi.script_name, FindNoCase( '_samples', cgi.script_name ) - 1 )> <cfmodule template="../../fckeditor.cfm" basePath="#basePath#" instanceName="myEditor" value='<p>This is some <strong>sample text</strong>. You are using <a href="http://www.fckeditor.net/">FCKeditor</a>.</p>' width="100%" height="200" config="#config#" > <cfoutput> <br> <input type="submit" value="Submit"> </form> </body> </html> </cfoutput> <cfsetting enablecfoutputonly="false">
10npsite
trunk/guanli/system/fckeditor/_samples/cfm/sample02.cfm
ColdFusion
asf20
3,139
<cfsetting enablecfoutputonly="true"> <!--- * FCKeditor - The text editor for Internet - http://www.fckeditor.net * Copyright (C) 2003-2009 Frederico Caldeira Knabben * * == BEGIN LICENSE == * * Licensed under the terms of any of the following licenses at your * choice: * * - GNU General Public License Version 2 or later (the "GPL") * http://www.gnu.org/licenses/gpl.html * * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") * http://www.gnu.org/licenses/lgpl.html * * - Mozilla Public License Version 1.1 or later (the "MPL") * http://www.mozilla.org/MPL/MPL-1.1.html * * == END LICENSE == * * Sample page for ColdFusion. ---> <cfoutput> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html> <head> <title>FCKeditor - Sample</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <meta name="robots" content="noindex, nofollow"> <link href="../sample.css" rel="stylesheet" type="text/css" /> <script type="text/javascript"> function FCKeditor_OnComplete( editorInstance ) { var oCombo = document.getElementById( 'cmbToolbars' ) ; oCombo.value = editorInstance.ToolbarSet.Name ; oCombo.style.visibility = '' ; } function ChangeToolbar( toolbarName ) { window.location.href = window.location.pathname + "?Toolbar=" + toolbarName ; } </script> </head> <body> <h1>FCKeditor - ColdFusion - Sample 3</h1> This sample shows how to change the editor toolbar. <hr> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td> Select the toolbar to load:&nbsp; </td> <td> <select id="cmbToolbars" onchange="ChangeToolbar(this.value);" style="VISIBILITY: hidden"> <option value="Default" selected>Default</option> <option value="Basic">Basic</option> </select> </td> </tr> </table> <br> <form action="sampleposteddata.cfm" method="post" target="_blank"> </cfoutput> <cfif isDefined( "URL.Toolbar" )> <cfset toolbarSet = REReplaceNoCase( URL.Toolbar, "[^a-z]", "", "all" )> <cfelse> <cfset toolbarSet = "Default"> </cfif> <!--- Calculate basepath for FCKeditor. It's in the folder right above _samples ---> <cfset basePath = Left( cgi.script_name, FindNoCase( '_samples', cgi.script_name ) - 1 )> <cfmodule template="../../fckeditor.cfm" basePath="#basePath#" instanceName="myEditor" value='<p>This is some <strong>sample text</strong>. You are using <a href="http://www.fckeditor.net/">FCKeditor</a>.</p>' width="100%" height="200" toolbarSet="#toolbarSet#" > <cfoutput> <br> <input type="submit" value="Submit"> </form> </body> </html> </cfoutput> <cfsetting enablecfoutputonly="false">
10npsite
trunk/guanli/system/fckeditor/_samples/cfm/sample03.cfm
ColdFusion
asf20
2,770
<cfsetting enablecfoutputonly="true"> <!--- * FCKeditor - The text editor for Internet - http://www.fckeditor.net * Copyright (C) 2003-2009 Frederico Caldeira Knabben * * == BEGIN LICENSE == * * Licensed under the terms of any of the following licenses at your * choice: * * - GNU General Public License Version 2 or later (the "GPL") * http://www.gnu.org/licenses/gpl.html * * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") * http://www.gnu.org/licenses/lgpl.html * * - Mozilla Public License Version 1.1 or later (the "MPL") * http://www.mozilla.org/MPL/MPL-1.1.html * * == END LICENSE == * * Sample page for ColdFusion MX 6.0 and above. ---> <cfoutput> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html> <head> <title>FCKeditor - Sample</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <meta name="robots" content="noindex, nofollow"> <link href="../sample.css" rel="stylesheet" type="text/css" /> <script type="text/javascript"> function FCKeditor_OnComplete( editorInstance ) { var oCombo = document.getElementById( 'cmbSkins' ) ; // Get the active skin. var sSkin = editorInstance.Config['SkinPath'] ; sSkin = sSkin.match( /[^\/]+(?=\/$)/g ) ; oCombo.value = sSkin ; oCombo.style.visibility = '' ; } function ChangeSkin( skinName ) { window.location.href = window.location.pathname + "?Skin=" + skinName ; } </script> </head> <body> <h1>FCKeditor - ColdFusion Component (CFC) - Sample 4</h1> This sample shows how to change the editor skin. <hr> </cfoutput> <cfif listFirst( server.coldFusion.productVersion ) LT 6> <cfoutput><br><em style="color: red;">This sample works only with a ColdFusion MX server and higher, because it uses some advantages of this version.</em></cfoutput> <cfabort> </cfif> <cfoutput> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td> Select the skin to load:&nbsp; </td> <td> <select id="cmbSkins" onchange="ChangeSkin(this.value);" style="VISIBILITY: hidden"> <option value="default" selected>Default</option> <option value="office2003">Office 2003</option> <option value="silver">Silver</option> </select> </td> </tr> </table> <br> <form action="sampleposteddata.cfm" method="post" target="_blank"> </cfoutput> <cfscript> // Calculate basepath for FCKeditor. It's in the folder right above _samples basePath = Left( cgi.script_name, FindNoCase( '_samples', cgi.script_name ) - 1 ) ; fckEditor = createObject( "component", "#basePath#fckeditor" ) ; fckEditor.instanceName = "myEditor" ; fckEditor.value = '<p>This is some <strong>sample text</strong>. You are using <a href="http://www.fckeditor.net/">FCKeditor</a>.</p>' ; fckEditor.basePath = basePath ; if ( isDefined( "URL.Skin" ) ) { fckEditor.config['SkinPath'] = basePath & 'editor/skins/' & REReplaceNoCase( URL.Skin, "[^a-z0-9]", "", "all" ) & '/' ; } fckEditor.create() ; // create the editor. </cfscript> <cfoutput> <br> <input type="submit" value="Submit"> </form> </body> </html> </cfoutput> <cfsetting enablecfoutputonly="false">
10npsite
trunk/guanli/system/fckeditor/_samples/cfm/sample04_mx.cfm
ColdFusion
asf20
3,277
<cfsetting enablecfoutputonly="true"> <!--- * FCKeditor - The text editor for Internet - http://www.fckeditor.net * Copyright (C) 2003-2009 Frederico Caldeira Knabben * * == BEGIN LICENSE == * * Licensed under the terms of any of the following licenses at your * choice: * * - GNU General Public License Version 2 or later (the "GPL") * http://www.gnu.org/licenses/gpl.html * * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") * http://www.gnu.org/licenses/lgpl.html * * - Mozilla Public License Version 1.1 or later (the "MPL") * http://www.mozilla.org/MPL/MPL-1.1.html * * == END LICENSE == * * Sample page for ColdFusion. ---> <cfoutput> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <title>FCKeditor - Sample</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <meta name="robots" content="noindex, nofollow"> <link href="../sample.css" rel="stylesheet" type="text/css" /> </head> <body> <h1>FCKeditor - ColdFusion - Sample 1</h1> This sample displays a normal HTML form with a FCKeditor with full features enabled. <hr> <form method="POST" action="sampleposteddata.cfm"> </cfoutput> <!--- Calculate basepath for FCKeditor. It's in the folder right above _samples ---> <cfset basePath = Left( cgi.script_name, FindNoCase( '_samples', cgi.script_name ) - 1 )> <cfmodule template="../../fckeditor.cfm" basePath="#basePath#" instanceName="myEditor" value='<p>This is some <strong>sample text</strong>. You are using <a href="http://www.fckeditor.net/">FCKeditor</a>.</p>' width="100%" height="200" > <cfoutput> <br /> <input type="submit" value="Submit"> <hr /> </form> </body> </html> </cfoutput> <cfsetting enablecfoutputonly="false">
10npsite
trunk/guanli/system/fckeditor/_samples/cfm/sample01.cfm
ColdFusion
asf20
1,826
<cfsetting enablecfoutputonly="true"> <!--- * FCKeditor - The text editor for Internet - http://www.fckeditor.net * Copyright (C) 2003-2009 Frederico Caldeira Knabben * * == BEGIN LICENSE == * * Licensed under the terms of any of the following licenses at your * choice: * * - GNU General Public License Version 2 or later (the "GPL") * http://www.gnu.org/licenses/gpl.html * * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") * http://www.gnu.org/licenses/lgpl.html * * - Mozilla Public License Version 1.1 or later (the "MPL") * http://www.mozilla.org/MPL/MPL-1.1.html * * == END LICENSE == * * Sample page for ColdFusion MX 6.0 and above. ---> <cfoutput> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <title>FCKeditor - Sample</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <meta name="robots" content="noindex, nofollow"> <link href="../sample.css" rel="stylesheet" type="text/css" /> </head> <body> <h1>FCKeditor - ColdFusion Component (CFC) - Sample 1</h1> This sample displays a normal HTML form with a FCKeditor with full features enabled. <hr> <form method="POST" action="sampleposteddata.cfm"> </cfoutput> <cfif listFirst( server.coldFusion.productVersion ) LT 6> <cfoutput><br><em style="color: red;">This sample works only with a ColdFusion MX server and higher, because it uses some advantages of this version.</em></cfoutput> <cfabort> </cfif> <cfscript> // Calculate basepath for FCKeditor. It's in the folder right above _samples basePath = Left( cgi.script_name, FindNoCase( '_samples', cgi.script_name ) - 1 ) ; fckEditor = createObject( "component", "#basePath#fckeditor" ) ; fckEditor.instanceName = "myEditor" ; fckEditor.value = '<p>This is some <strong>sample text</strong>. You are using <a href="http://www.fckeditor.net/">FCKeditor</a>.</p>' ; fckEditor.basePath = basePath ; fckEditor.Create() ; // create the editor. </cfscript> <cfoutput> <br /> <input type="submit" value="Submit"> <hr /> </form> </body> </html> </cfoutput> <cfsetting enablecfoutputonly="false">
10npsite
trunk/guanli/system/fckeditor/_samples/cfm/sample01_mx.cfm
ColdFusion
asf20
2,198
<cfsetting enablecfoutputonly="true"> <!--- * FCKeditor - The text editor for Internet - http://www.fckeditor.net * Copyright (C) 2003-2009 Frederico Caldeira Knabben * * == BEGIN LICENSE == * * Licensed under the terms of any of the following licenses at your * choice: * * - GNU General Public License Version 2 or later (the "GPL") * http://www.gnu.org/licenses/gpl.html * * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") * http://www.gnu.org/licenses/lgpl.html * * - Mozilla Public License Version 1.1 or later (the "MPL") * http://www.mozilla.org/MPL/MPL-1.1.html * * == END LICENSE == * * Sample page for ColdFusion. ---> <cfoutput> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html> <head> <title>FCKeditor - Sample</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <meta name="robots" content="noindex, nofollow"> <link href="../sample.css" rel="stylesheet" type="text/css" /> <script type="text/javascript"> function FCKeditor_OnComplete( editorInstance ) { var oCombo = document.getElementById( 'cmbSkins' ) ; // Get the active skin. var sSkin = editorInstance.Config['SkinPath'] ; sSkin = sSkin.match( /[^\/]+(?=\/$)/g ) ; oCombo.value = sSkin ; oCombo.style.visibility = '' ; } function ChangeSkin( skinName ) { window.location.href = window.location.pathname + "?Skin=" + skinName ; } </script> </head> <body> <h1>FCKeditor - ColdFusion - Sample 4</h1> This sample shows how to change the editor skin. <hr> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td> Select the skin to load:&nbsp; </td> <td> <select id="cmbSkins" onchange="ChangeSkin(this.value);" style="VISIBILITY: hidden"> <option value="default" selected>Default</option> <option value="office2003">Office 2003</option> <option value="silver">Silver</option> </select> </td> </tr> </table> <br> <form action="sampleposteddata.cfm" method="post" target="_blank"> </cfoutput> <!--- Calculate basepath for FCKeditor. It's in the folder right above _samples ---> <cfset basePath = Left( cgi.script_name, FindNoCase( '_samples', cgi.script_name ) - 1 )> <cfset config = structNew()> <cfif isDefined( "URL.Skin" )> <cfset config["SkinPath"] = basePath & 'editor/skins/' & REReplaceNoCase( URL.Skin, "[^a-z0-9]", "", "all" ) & '/'> </cfif> <cfmodule template="../../fckeditor.cfm" basePath="#basePath#" instanceName="myEditor" value='<p>This is some <strong>sample text</strong>. You are using <a href="http://www.fckeditor.net/">FCKeditor</a>.</p>' width="100%" height="200" config="#config#" > <cfoutput> <br> <input type="submit" value="Submit"> </form> </body> </html> </cfoutput> <cfsetting enablecfoutputonly="false">
10npsite
trunk/guanli/system/fckeditor/_samples/cfm/sample04.cfm
ColdFusion
asf20
2,920
<cfsetting enablecfoutputonly="true"> <!--- * FCKeditor - The text editor for Internet - http://www.fckeditor.net * Copyright (C) 2003-2009 Frederico Caldeira Knabben * * == BEGIN LICENSE == * * Licensed under the terms of any of the following licenses at your * choice: * * - GNU General Public License Version 2 or later (the "GPL") * http://www.gnu.org/licenses/gpl.html * * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") * http://www.gnu.org/licenses/lgpl.html * * - Mozilla Public License Version 1.1 or later (the "MPL") * http://www.mozilla.org/MPL/MPL-1.1.html * * == END LICENSE == * * Sample page for ColdFusion MX 6.0 and above. ---> <cfoutput> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <title>FCKeditor - Sample</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <meta name="robots" content="noindex, nofollow"> <link href="../sample.css" rel="stylesheet" type="text/css" /> <script type="text/javascript"> function FCKeditor_OnComplete( editorInstance ) { var oCombo = document.getElementById( 'cmbLanguages' ) ; for ( code in editorInstance.Language.AvailableLanguages ) { AddComboOption( oCombo, editorInstance.Language.AvailableLanguages[code] + ' (' + code + ')', code ) ; } oCombo.value = editorInstance.Language.ActiveLanguage.Code ; } function AddComboOption(combo, optionText, optionValue) { var oOption = document.createElement("OPTION") ; combo.options.add(oOption) ; oOption.innerHTML = optionText ; oOption.value = optionValue ; return oOption ; } function ChangeLanguage( languageCode ) { window.location.href = window.location.pathname + "?Lang=" + languageCode ; } </script> </head> <body> <h1>FCKeditor - ColdFusion Component (CFC) - Sample 2</h1> This sample shows the editor in all its available languages. <hr> </cfoutput> <cfif listFirst( server.coldFusion.productVersion ) LT 6> <cfoutput><br><em style="color: red;">This sample works only with a ColdFusion MX server and higher, because it uses some advantages of this version.</em></cfoutput> <cfabort> </cfif> <cfoutput> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td> Select a language:&nbsp; </td> <td> <select id="cmbLanguages" onchange="ChangeLanguage(this.value);"> </select> </td> </tr> </table> <br> <form action="sampleposteddata.cfm" method="post" target="_blank"> </cfoutput> <cfscript> // Calculate basepath for FCKeditor. It's in the folder right above _samples basePath = Left( cgi.script_name, FindNoCase( '_samples', cgi.script_name ) - 1 ) ; fckEditor = createObject( "component", "#basePath#fckeditor" ) ; fckEditor.instanceName = "myEditor" ; fckEditor.value = '<p>This is some <strong>sample text</strong>. You are using <a href="http://www.fckeditor.net/">FCKeditor</a>.</p>' ; fckEditor.basePath = basePath ; if ( isDefined( "URL.Lang" ) ) { fckEditor.config["AutoDetectLanguage"] = false ; fckEditor.config["DefaultLanguage"] = REReplaceNoCase( URL.Lang, "[^a-z\-]", "", "all" ) ; } else { fckEeditor.config["AutoDetectLanguage"] = true ; fckEeditor.config["DefaultLanguage"] = 'en' ; } fckEditor.create() ; // create the editor. </cfscript> <cfoutput> <br> <input type="submit" value="Submit"> </form> </body> </html> </cfoutput> <cfsetting enablecfoutputonly="false">
10npsite
trunk/guanli/system/fckeditor/_samples/cfm/sample02_mx.cfm
ColdFusion
asf20
3,527
<cfsetting enablecfoutputonly="true"> <!--- * FCKeditor - The text editor for Internet - http://www.fckeditor.net * Copyright (C) 2003-2009 Frederico Caldeira Knabben * * == BEGIN LICENSE == * * Licensed under the terms of any of the following licenses at your * choice: * * - GNU General Public License Version 2 or later (the "GPL") * http://www.gnu.org/licenses/gpl.html * * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") * http://www.gnu.org/licenses/lgpl.html * * - Mozilla Public License Version 1.1 or later (the "MPL") * http://www.mozilla.org/MPL/MPL-1.1.html * * == END LICENSE == * * Sample page for ColdFusion MX 6.0 and above. ---> <cfoutput> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html> <head> <title>FCKeditor - Sample</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <meta name="robots" content="noindex, nofollow"> <link href="../sample.css" rel="stylesheet" type="text/css" /> <script type="text/javascript"> function FCKeditor_OnComplete( editorInstance ) { var oCombo = document.getElementById( 'cmbToolbars' ) ; oCombo.value = editorInstance.ToolbarSet.Name ; oCombo.style.visibility = '' ; } function ChangeToolbar( toolbarName ) { window.location.href = window.location.pathname + "?Toolbar=" + toolbarName ; } </script> </head> <body> <h1>FCKeditor - ColdFusion Component (CFC) - Sample 3</h1> This sample shows how to change the editor toolbar. <hr> </cfoutput> <cfif listFirst( server.coldFusion.productVersion ) LT 6> <cfoutput><br><em style="color: red;">This sample works only with a ColdFusion MX server and higher, because it uses some advantages of this version.</em></cfoutput> <cfabort> </cfif> <cfoutput> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td> Select the toolbar to load:&nbsp; </td> <td> <select id="cmbToolbars" onchange="ChangeToolbar(this.value);" style="VISIBILITY: hidden"> <option value="Default" selected>Default</option> <option value="Basic">Basic</option> </select> </td> </tr> </table> <br> <form action="sampleposteddata.cfm" method="post" target="_blank"> </cfoutput> <cfscript> // Calculate basepath for FCKeditor. It's in the folder right above _samples basePath = Left( cgi.script_name, FindNoCase( '_samples', cgi.script_name ) - 1 ) ; fckEditor = createObject( "component", "#basePath#fckeditor" ) ; fckEditor.instanceName = "myEditor" ; fckEditor.value = '<p>This is some <strong>sample text</strong>. You are using <a href="http://www.fckeditor.net/">FCKeditor</a>.</p>' ; fckEditor.basePath = basePath ; if ( isDefined( "URL.Toolbar" ) ) { fckEditor.ToolbarSet = REReplaceNoCase( URL.Toolbar, "[^a-z]", "", "all" ) ; } fckEditor.create() ; // create the editor. </cfscript> <cfoutput> <br> <input type="submit" value="Submit"> </form> </body> </html> </cfoutput> <cfsetting enablecfoutputonly="false">
10npsite
trunk/guanli/system/fckeditor/_samples/cfm/sample03_mx.cfm
ColdFusion
asf20
3,107
<?php /* * FCKeditor - The text editor for Internet - http://www.fckeditor.net * Copyright (C) 2003-2009 Frederico Caldeira Knabben * * == BEGIN LICENSE == * * Licensed under the terms of any of the following licenses at your * choice: * * - GNU General Public License Version 2 or later (the "GPL") * http://www.gnu.org/licenses/gpl.html * * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") * http://www.gnu.org/licenses/lgpl.html * * - Mozilla Public License Version 1.1 or later (the "MPL") * http://www.mozilla.org/MPL/MPL-1.1.html * * == END LICENSE == * * Sample page. */ include("../../fckeditor.php") ; ?> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html> <head> <title>FCKeditor - Sample</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <meta name="robots" content="noindex, nofollow"> <link href="../sample.css" rel="stylesheet" type="text/css" /> </head> <body> <h1>FCKeditor - PHP - Sample 1</h1> This sample displays a normal HTML form with an FCKeditor with full features enabled. <hr> <form action="sampleposteddata.php" method="post" target="_blank"> <?php // Automatically calculates the editor base path based on the _samples directory. // This is usefull only for these samples. A real application should use something like this: // $oFCKeditor->BasePath = '/fckeditor/' ; // '/fckeditor/' is the default value. $sBasePath = $_SERVER['PHP_SELF'] ; $sBasePath = substr( $sBasePath, 0, strpos( $sBasePath, "_samples" ) ) ; $oFCKeditor = new FCKeditor('FCKeditor1') ; $oFCKeditor->BasePath = $sBasePath ; $oFCKeditor->Value = '<p>This is some <strong>sample text</strong>. You are using <a href="http://www.fckeditor.net/">FCKeditor</a>.</p>' ; $oFCKeditor->Create() ; ?> <br> <input type="submit" value="Submit"> </form> </body> </html>
10npsite
trunk/guanli/system/fckeditor/_samples/php/sample01.php
PHP
asf20
1,945
<?php /* * FCKeditor - The text editor for Internet - http://www.fckeditor.net * Copyright (C) 2003-2009 Frederico Caldeira Knabben * * == BEGIN LICENSE == * * Licensed under the terms of any of the following licenses at your * choice: * * - GNU General Public License Version 2 or later (the "GPL") * http://www.gnu.org/licenses/gpl.html * * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") * http://www.gnu.org/licenses/lgpl.html * * - Mozilla Public License Version 1.1 or later (the "MPL") * http://www.mozilla.org/MPL/MPL-1.1.html * * == END LICENSE == * * Sample page. */ include("../../fckeditor.php") ; ?> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html> <head> <title>FCKeditor - Sample</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <meta name="robots" content="noindex, nofollow"> <link href="../sample.css" rel="stylesheet" type="text/css" /> <script type="text/javascript"> function FCKeditor_OnComplete( editorInstance ) { var oCombo = document.getElementById( 'cmbToolbars' ) ; oCombo.value = editorInstance.ToolbarSet.Name ; oCombo.style.visibility = '' ; } function ChangeToolbar( toolbarName ) { window.location.href = window.location.pathname + "?Toolbar=" + toolbarName ; } </script> </head> <body> <h1>FCKeditor - PHP - Sample 3</h1> This sample shows how to change the editor toolbar. <hr> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td> Select the toolbar to load:&nbsp; </td> <td> <select id="cmbToolbars" onchange="ChangeToolbar(this.value);" style="VISIBILITY: hidden"> <option value="Default" selected>Default</option> <option value="Basic">Basic</option> </select> </td> </tr> </table> <br> <form action="sampleposteddata.php" method="post" target="_blank"> <?php // Automatically calculates the editor base path based on the _samples directory. // This is usefull only for these samples. A real application should use something like this: // $oFCKeditor->BasePath = '/fckeditor/' ; // '/fckeditor/' is the default value. $sBasePath = $_SERVER['PHP_SELF'] ; $sBasePath = substr( $sBasePath, 0, strpos( $sBasePath, "_samples" ) ) ; $oFCKeditor = new FCKeditor('FCKeditor1') ; $oFCKeditor->BasePath = $sBasePath ; if ( isset($_GET['Toolbar']) ) $oFCKeditor->ToolbarSet = preg_replace("/[^a-z]/i", "", $_GET['Toolbar']); $oFCKeditor->Value = '<p>This is some <strong>sample text</strong>. You are using <a href="http://www.fckeditor.net/">FCKeditor</a>.</p>' ; $oFCKeditor->Create() ; ?> <br> <input type="submit" value="Submit"> </form> </body> </html>
10npsite
trunk/guanli/system/fckeditor/_samples/php/sample03.php
PHP
asf20
2,784
<?php /* * FCKeditor - The text editor for Internet - http://www.fckeditor.net * Copyright (C) 2003-2009 Frederico Caldeira Knabben * * == BEGIN LICENSE == * * Licensed under the terms of any of the following licenses at your * choice: * * - GNU General Public License Version 2 or later (the "GPL") * http://www.gnu.org/licenses/gpl.html * * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") * http://www.gnu.org/licenses/lgpl.html * * - Mozilla Public License Version 1.1 or later (the "MPL") * http://www.mozilla.org/MPL/MPL-1.1.html * * == END LICENSE == * * Sample page. */ include("../../fckeditor.php") ; ?> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html> <head> <title>FCKeditor - Sample</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <meta name="robots" content="noindex, nofollow"> <link href="../sample.css" rel="stylesheet" type="text/css" /> <script type="text/javascript"> function FCKeditor_OnComplete( editorInstance ) { var oCombo = document.getElementById( 'cmbSkins' ) ; // Get the active skin. var sSkin = editorInstance.Config['SkinPath'] ; sSkin = sSkin.match( /[^\/]+(?=\/$)/g ) ; oCombo.value = sSkin ; oCombo.style.visibility = '' ; } function ChangeSkin( skinName ) { window.location.href = window.location.pathname + "?Skin=" + skinName ; } </script> </head> <body> <h1>FCKeditor - PHP - Sample 4</h1> This sample shows how to change the editor skin. <hr> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td> Select the skin to load:&nbsp; </td> <td> <select id="cmbSkins" onchange="ChangeSkin(this.value);" style="VISIBILITY: hidden"> <option value="default" selected>Default</option> <option value="office2003">Office 2003</option> <option value="silver">Silver</option> </select> </td> </tr> </table> <br> <form action="sampleposteddata.php" method="post" target="_blank"> <?php // Automatically calculates the editor base path based on the _samples directory. // This is usefull only for these samples. A real application should use something like this: // $oFCKeditor->BasePath = '/fckeditor/' ; // '/fckeditor/' is the default value. $sBasePath = $_SERVER['PHP_SELF'] ; $sBasePath = substr( $sBasePath, 0, strpos( $sBasePath, "_samples" ) ) ; $oFCKeditor = new FCKeditor('FCKeditor1') ; $oFCKeditor->BasePath = $sBasePath ; if ( isset($_GET['Skin']) ) $oFCKeditor->Config['SkinPath'] = $sBasePath . 'editor/skins/' . preg_replace("/[^a-z0-9]/i", "", $_GET['Skin']) . '/' ; $oFCKeditor->Value = '<p>This is some <strong>sample text</strong>. You are using <a href="http://www.fckeditor.net/">FCKeditor</a>.</p>' ; $oFCKeditor->Create() ; ?> <br> <input type="submit" value="Submit"> </form> </body> </html>
10npsite
trunk/guanli/system/fckeditor/_samples/php/sample04.php
PHP
asf20
2,956
<?php /* * FCKeditor - The text editor for Internet - http://www.fckeditor.net * Copyright (C) 2003-2009 Frederico Caldeira Knabben * * == BEGIN LICENSE == * * Licensed under the terms of any of the following licenses at your * choice: * * - GNU General Public License Version 2 or later (the "GPL") * http://www.gnu.org/licenses/gpl.html * * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") * http://www.gnu.org/licenses/lgpl.html * * - Mozilla Public License Version 1.1 or later (the "MPL") * http://www.mozilla.org/MPL/MPL-1.1.html * * == END LICENSE == * * Sample page. */ include("../../fckeditor.php") ; ?> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html> <head> <title>FCKeditor - Sample</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <meta name="robots" content="noindex, nofollow"> <link href="../sample.css" rel="stylesheet" type="text/css" /> <script type="text/javascript"> function FCKeditor_OnComplete( editorInstance ) { var oCombo = document.getElementById( 'cmbLanguages' ) ; for ( code in editorInstance.Language.AvailableLanguages ) { AddComboOption( oCombo, editorInstance.Language.AvailableLanguages[code] + ' (' + code + ')', code ) ; } oCombo.value = editorInstance.Language.ActiveLanguage.Code ; } function AddComboOption(combo, optionText, optionValue) { var oOption = document.createElement("OPTION") ; combo.options.add(oOption) ; oOption.innerHTML = optionText ; oOption.value = optionValue ; return oOption ; } function ChangeLanguage( languageCode ) { window.location.href = window.location.pathname + "?Lang=" + languageCode ; } </script> </head> <body> <h1>FCKeditor - PHP - Sample 2</h1> This sample shows the editor in all its available languages. <hr> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td> Select a language:&nbsp; </td> <td> <select id="cmbLanguages" onchange="ChangeLanguage(this.value);"> </select> </td> </tr> </table> <br> <form action="sampleposteddata.php" method="post" target="_blank"> <?php // Automatically calculates the editor base path based on the _samples directory. // This is usefull only for these samples. A real application should use something like this: // $oFCKeditor->BasePath = '/fckeditor/' ; // '/fckeditor/' is the default value. $sBasePath = $_SERVER['PHP_SELF'] ; $sBasePath = substr( $sBasePath, 0, strpos( $sBasePath, "_samples" ) ) ; $oFCKeditor = new FCKeditor('FCKeditor1') ; $oFCKeditor->BasePath = $sBasePath ; if ( isset($_GET['Lang']) ) { $oFCKeditor->Config['AutoDetectLanguage'] = false ; $oFCKeditor->Config['DefaultLanguage'] = preg_replace("/[^a-z\-]/i", "", $_GET['Lang']) ; } else { $oFCKeditor->Config['AutoDetectLanguage'] = true ; $oFCKeditor->Config['DefaultLanguage'] = 'en' ; } $oFCKeditor->Value = '<p>This is some <strong>sample text</strong>. You are using <a href="http://www.fckeditor.net/">FCKeditor</a>.</p>' ; $oFCKeditor->Create() ; ?> <br> <input type="submit" value="Submit"> </form> </body> </html>
10npsite
trunk/guanli/system/fckeditor/_samples/php/sample02.php
PHP
asf20
3,242
<?php /* * FCKeditor - The text editor for Internet - http://www.fckeditor.net * Copyright (C) 2003-2009 Frederico Caldeira Knabben * * == BEGIN LICENSE == * * Licensed under the terms of any of the following licenses at your * choice: * * - GNU General Public License Version 2 or later (the "GPL") * http://www.gnu.org/licenses/gpl.html * * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") * http://www.gnu.org/licenses/lgpl.html * * - Mozilla Public License Version 1.1 or later (the "MPL") * http://www.mozilla.org/MPL/MPL-1.1.html * * == END LICENSE == * * This page lists the data posted by a form. */ ?> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html> <head> <title>FCKeditor - Samples - Posted Data</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <meta name="robots" content="noindex, nofollow"> <link href="../sample.css" rel="stylesheet" type="text/css" > </head> <body> <h1>FCKeditor - Samples - Posted Data</h1> This page lists all data posted by the form. <hr> <table border="1" cellspacing="0" id="outputSample"> <colgroup><col width="80"><col></colgroup> <thead> <tr> <th>Field Name</th> <th>Value</th> </tr> </thead> <?php if ( isset( $_POST ) ) $postArray = &$_POST ; // 4.1.0 or later, use $_POST else $postArray = &$HTTP_POST_VARS ; // prior to 4.1.0, use HTTP_POST_VARS foreach ( $postArray as $sForm => $value ) { if ( get_magic_quotes_gpc() ) $postedValue = htmlspecialchars( stripslashes( $value ) ) ; else $postedValue = htmlspecialchars( $value ) ; ?> <tr> <th><?php echo htmlspecialchars($sForm) ?></th> <td><pre><?php echo $postedValue?></pre></td> </tr> <?php } ?> </table> </body> </html>
10npsite
trunk/guanli/system/fckeditor/_samples/php/sampleposteddata.php
PHP
asf20
1,871
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <!-- * FCKeditor - The text editor for Internet - http://www.fckeditor.net * Copyright (C) 2003-2009 Frederico Caldeira Knabben * * == BEGIN LICENSE == * * Licensed under the terms of any of the following licenses at your * choice: * * - GNU General Public License Version 2 or later (the "GPL") * http://www.gnu.org/licenses/gpl.html * * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") * http://www.gnu.org/licenses/lgpl.html * * - Mozilla Public License Version 1.1 or later (the "MPL") * http://www.mozilla.org/MPL/MPL-1.1.html * * == END LICENSE == * * Page used to select the sample to view. --> <html> <head> <title>FCKeditor - Sample Selection</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <meta name="robots" content="noindex, nofollow"> <link href="sample.css" rel="stylesheet" type="text/css"> <script type="text/javascript"> if ( window.top == window ) document.location = 'default.html' ; function OpenSample( sample ) { if ( sample.length > 0 ) window.open( sample, 'Sample' ) ; } </script> </head> <body style="margin:1em;"> <table border="0" cellpadding="0" cellspacing="0" style="height: 100%"> <tr> <td> Please select the sample you want to view: <br /> <select onchange="OpenSample(this.value);"> <optgroup label="JavaScript"> <option value="html/sample01.html" selected="selected">JavaScript : Sample 01 : Editor with all features</option> <option value="html/sample02.html">JavaScript : Sample 02 : Replacement of a TEXTAREA</option> <option value="html/sample03.html">JavaScript : Sample 03 : Multi-language support</option> <option value="html/sample04.html">JavaScript : Sample 04 : Toolbar selection</option> <option value="html/sample05.html">JavaScript : Sample 05 : Skins support</option> <option value="html/sample06.html">JavaScript : Sample 06 : Plugins support</option> <option value="html/sample07.html">JavaScript : Sample 07 : Full Page editing</option> <option value="html/sample08.html">JavaScript : Sample 08 : Editor API usage</option> <option value="html/sample09.html">JavaScript : Sample 09 : Complex form (multiple editors)</option> <option value="html/sample10.html">JavaScript : Sample 10 : Shared toolbar on same page</option> <option value="html/sample11.html">JavaScript : Sample 11 : Shared toolbar from IFRAME</option> <option value="html/sample12.html">JavaScript : Sample 12 : Enter key behavior</option> <option value="html/sample13.html">JavaScript : Sample 13 : Dinamically switching with a Textarea</option> <option value="html/sample14.html">JavaScript : Sample 14 : XHTML 1.1</option> <option value="html/sample15.html">JavaScript : Sample 15 : Legacy HTML 4 tags</option> <option value="html/sample16.html">JavaScript : Sample 16 : Flash content editor</option> <option value=""></option> </optgroup> <optgroup label="Active Fox Pro"> <option value="afp/sample01.afp">AFP : Sample 01 : Editor with all features</option> <option value="afp/sample02.afp">AFP : Sample 02 : Multi-language support</option> <option value="afp/sample03.afp">AFP : Sample 03 : Toolbar selection</option> <option value="afp/sample04.afp">AFP : Sample 04 : Skins support</option> <option value=""></option> </optgroup> <optgroup label="ASP"> <option value="asp/sample01.asp">ASP : Sample 01 : Editor with all features</option> <option value="asp/sample02.asp">ASP : Sample 02 : Multi-language support</option> <option value="asp/sample03.asp">ASP : Sample 03 : Toolbar selection</option> <option value="asp/sample04.asp">ASP : Sample 04 : Skins support</option> <option value=""></option> </optgroup> <optgroup label="ColdFusion"> <option value="cfm/sample01.cfm">ColdFusion : Sample 01 : Editor with all features</option> <option value="cfm/sample02_mx.cfm">ColdFusion : Sample 02 : Advanced version for ColdFusion MX</option> <option value=""></option> </optgroup> <optgroup label="Lasso"> <option value="lasso/sample01.lasso">Lasso : Sample 01 : Editor with all features</option> <option value="lasso/sample02.lasso">Lasso : Sample 02 : Multi-language support</option> <option value="lasso/sample03.lasso">Lasso : Sample 03 : Toolbar selection</option> <option value="lasso/sample04.lasso">Lasso : Sample 04 : Skins support</option> <option value=""></option> </optgroup> <optgroup label="Perl"> <option value="perl/sample01.cgi">Perl : Sample 01 : Editor with all features</option> <option value="perl/sample02.cgi">Perl : Sample 02 : Multi-language support</option> <option value="perl/sample03.cgi">Perl : Sample 03 : Toolbar selection</option> <option value="perl/sample04.cgi">Perl : Sample 04 : Skins support</option> <option value=""></option> </optgroup> <optgroup label="PHP"> <option value="php/sample01.php">PHP : Sample 01 : Editor with all features</option> <option value="php/sample02.php">PHP : Sample 02 : Multi-language support</option> <option value="php/sample03.php">PHP : Sample 03 : Toolbar selection</option> <option value="php/sample04.php">PHP : Sample 04 : Skins support</option> <option value=""></option> </optgroup> <optgroup label="Python"> <option value="py/sample01.py">Python : Sample 01 : Editor with all features</option> </optgroup> </select> </td> </tr> </table> </body> </html>
10npsite
trunk/guanli/system/fckeditor/_samples/sampleslist.html
HTML
asf20
5,858
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <!-- * FCKeditor - The text editor for Internet - http://www.fckeditor.net * Copyright (C) 2003-2009 Frederico Caldeira Knabben * * == BEGIN LICENSE == * * Licensed under the terms of any of the following licenses at your * choice: * * - GNU General Public License Version 2 or later (the "GPL") * http://www.gnu.org/licenses/gpl.html * * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") * http://www.gnu.org/licenses/lgpl.html * * - Mozilla Public License Version 1.1 or later (the "MPL") * http://www.mozilla.org/MPL/MPL-1.1.html * * == END LICENSE == * * Sample page. --> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>FCKeditor - Sample</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <meta name="robots" content="noindex, nofollow" /> <link href="../sample.css" rel="stylesheet" type="text/css" /> <script type="text/javascript" src="../../fckeditor.js"></script> <script type="text/javascript"> var bIsLoaded = false ; function FCKeditor_OnComplete( editorInstance ) { if ( bIsLoaded ) return ; var oCombo = document.getElementById( 'cmbLanguages' ) ; // Remove all options. (#1399) oCombo.innerHTML = '' ; var aLanguages = new Array() ; for ( code in editorInstance.Language.AvailableLanguages ) aLanguages.push( { Code : code, Name : editorInstance.Language.AvailableLanguages[code] } ) ; aLanguages.sort( SortLanguage ) ; for ( var i = 0 ; i < aLanguages.length ; i++ ) AddComboOption( oCombo, aLanguages[i].Name + ' (' + aLanguages[i].Code + ')', aLanguages[i].Code ) ; oCombo.value = editorInstance.Language.ActiveLanguage.Code ; document.getElementById('eNumLangs').innerHTML = '(' + aLanguages.length + ' languages available!)' ; bIsLoaded = true ; } function SortLanguage( langA, langB ) { return ( langA.Name < langB.Name ? -1 : langA.Name > langB.Name ? 1 : 0 ) ; } function AddComboOption(combo, optionText, optionValue) { var oOption = document.createElement("OPTION") ; combo.options.add(oOption) ; oOption.innerHTML = optionText ; oOption.value = optionValue ; return oOption ; } function ChangeLanguage( languageCode ) { document.location.href = document.location.href.replace( /\?.*$/, '' ) + "?" + languageCode ; } </script> </head> <body> <h1> FCKeditor - JavaScript - Sample 3</h1> <div> This sample shows the editor in all its available languages. </div> <hr /> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td> Select a language:&nbsp; </td> <td> <select id="cmbLanguages" onchange="ChangeLanguage(this.value);"> <option>&nbsp;</option> </select> </td> <td> &nbsp;<span id="eNumLangs"></span> </td> </tr> </table> <br /> <form action="../php/sampleposteddata.php" method="post" target="_blank"> <script type="text/javascript"> <!-- // Automatically calculates the editor base path based on the _samples directory. // This is usefull only for these samples. A real application should use something like this: // oFCKeditor.BasePath = '/fckeditor/' ; // '/fckeditor/' is the default value. var sBasePath = document.location.href.substring(0,document.location.href.lastIndexOf('_samples')) ; var sLang ; if ( document.location.search.length > 1 ) sLang = document.location.search.substr(1) ; var oFCKeditor = new FCKeditor( 'FCKeditor1' ) ; oFCKeditor.BasePath = sBasePath ; if ( sLang == null ) { oFCKeditor.Config["AutoDetectLanguage"] = true ; oFCKeditor.Config["DefaultLanguage"] = "en" ; } else { oFCKeditor.Config["AutoDetectLanguage"] = false ; oFCKeditor.Config["DefaultLanguage"] = sLang ; } oFCKeditor.Value = '<p>This is some <strong>sample text<\/strong>. You are using <a href="http://www.fckeditor.net/">FCKeditor<\/a>.<\/p>' ; oFCKeditor.Create() ; //--> </script> <br /> <input type="submit" value="Submit" /> </form> </body> </html>
10npsite
trunk/guanli/system/fckeditor/_samples/html/sample03.html
HTML
asf20
4,170
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <!-- * FCKeditor - The text editor for Internet - http://www.fckeditor.net * Copyright (C) 2003-2009 Frederico Caldeira Knabben * * == BEGIN LICENSE == * * Licensed under the terms of any of the following licenses at your * choice: * * - GNU General Public License Version 2 or later (the "GPL") * http://www.gnu.org/licenses/gpl.html * * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") * http://www.gnu.org/licenses/lgpl.html * * - Mozilla Public License Version 1.1 or later (the "MPL") * http://www.mozilla.org/MPL/MPL-1.1.html * * == END LICENSE == * * Sample page. --> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>FCKeditor - Sample</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <meta name="robots" content="noindex, nofollow" /> <link href="../sample.css" rel="stylesheet" type="text/css" /> </head> <body> <h1> FCKeditor - JavaScript - Sample 11</h1> <div> This sample shows a form with two FCKeditor instance loaded inside an IFRAME. Both instances share the same toolbar, available in the main page (top). </div> <hr /> <div id="xToolbar"></div> <hr /> <iframe src="assets/sample11_frame.html" width="100%" height="300"></iframe> </body> </html>
10npsite
trunk/guanli/system/fckeditor/_samples/html/sample11.html
HTML
asf20
1,436
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <!-- * FCKeditor - The text editor for Internet - http://www.fckeditor.net * Copyright (C) 2003-2009 Frederico Caldeira Knabben * * == BEGIN LICENSE == * * Licensed under the terms of any of the following licenses at your * choice: * * - GNU General Public License Version 2 or later (the "GPL") * http://www.gnu.org/licenses/gpl.html * * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") * http://www.gnu.org/licenses/lgpl.html * * - Mozilla Public License Version 1.1 or later (the "MPL") * http://www.mozilla.org/MPL/MPL-1.1.html * * == END LICENSE == * * Sample page. --> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>FCKeditor - Sample</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <meta name="robots" content="noindex, nofollow" /> <link href="../sample.css" rel="stylesheet" type="text/css" /> <script type="text/javascript" src="../../fckeditor.js"></script> <script type="text/javascript"> window.onload = function() { // Automatically calculates the editor base path based on the _samples directory. // This is usefull only for these samples. A real application should use something like this: // oFCKeditor.BasePath = '/fckeditor/' ; // '/fckeditor/' is the default value. var sBasePath = document.location.href.substring(0,document.location.href.lastIndexOf('_samples')) ; var oFCKeditor = new FCKeditor( 'FCKeditor1' ) ; oFCKeditor.BasePath = sBasePath ; oFCKeditor.ReplaceTextarea() ; } </script> </head> <body> <h1> FCKeditor - JavaScript - Sample 2</h1> <div> This sample displays a normal HTML form with an FCKeditor with full features enabled. It uses the "ReplaceTextarea" command to create the editor. </div> <hr /> <form action="../php/sampleposteddata.php" method="post" target="_blank"> <div> <textarea name="FCKeditor1" rows="10" cols="80" style="width: 100%; height: 200px">&lt;p&gt;This is some &lt;strong&gt;sample text&lt;/strong&gt;. You are using &lt;a href="http://www.fckeditor.net/"&gt;FCKeditor&lt;/a&gt;.&lt;/p&gt;</textarea> </div> <br /> <input type="submit" value="Submit" /> </form> </body> </html>
10npsite
trunk/guanli/system/fckeditor/_samples/html/sample02.html
HTML
asf20
2,359
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <!-- * FCKeditor - The text editor for Internet - http://www.fckeditor.net * Copyright (C) 2003-2009 Frederico Caldeira Knabben * * == BEGIN LICENSE == * * Licensed under the terms of any of the following licenses at your * choice: * * - GNU General Public License Version 2 or later (the "GPL") * http://www.gnu.org/licenses/gpl.html * * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") * http://www.gnu.org/licenses/lgpl.html * * - Mozilla Public License Version 1.1 or later (the "MPL") * http://www.mozilla.org/MPL/MPL-1.1.html * * == END LICENSE == * * Sample page. --> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>FCKeditor - Sample</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <meta name="robots" content="noindex, nofollow" /> <link href="../sample.css" rel="stylesheet" type="text/css" /> <script type="text/javascript" src="../../fckeditor.js"></script> </head> <body> <h1> FCKeditor - JavaScript - Sample 1 </h1> <div> This sample displays a normal HTML form with an FCKeditor with full features enabled. </div> <hr /> <form action="../php/sampleposteddata.php" method="post" target="_blank"> <script type="text/javascript"> <!-- // Automatically calculates the editor base path based on the _samples directory. // This is usefull only for these samples. A real application should use something like this: // oFCKeditor.BasePath = '/fckeditor/' ; // '/fckeditor/' is the default value. var sBasePath = document.location.href.substring(0,document.location.href.lastIndexOf('_samples')) ; var oFCKeditor = new FCKeditor( 'FCKeditor1' ) ; oFCKeditor.BasePath = sBasePath ; oFCKeditor.Height = 300 ; oFCKeditor.Value = '<p>This is some <strong>sample text<\/strong>. You are using <a href="http://www.fckeditor.net/">FCKeditor<\/a>.<\/p>' ; oFCKeditor.Create() ; //--> </script> <br /> <input type="submit" value="Submit" /> </form> </body> </html>
10npsite
trunk/guanli/system/fckeditor/_samples/html/sample01.html
HTML
asf20
2,161
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <!-- * FCKeditor - The text editor for Internet - http://www.fckeditor.net * Copyright (C) 2003-2009 Frederico Caldeira Knabben * * == BEGIN LICENSE == * * Licensed under the terms of any of the following licenses at your * choice: * * - GNU General Public License Version 2 or later (the "GPL") * http://www.gnu.org/licenses/gpl.html * * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") * http://www.gnu.org/licenses/lgpl.html * * - Mozilla Public License Version 1.1 or later (the "MPL") * http://www.mozilla.org/MPL/MPL-1.1.html * * == END LICENSE == * * Sample page. --> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>FCKeditor - Sample</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <meta name="robots" content="noindex, nofollow" /> <link href="../sample.css" rel="stylesheet" type="text/css" /> <script type="text/javascript" src="../../fckeditor.js"></script> </head> <body> <h1> FCKeditor - JavaScript - Sample 15 </h1> <div> This sample shows FCKeditor configured to produce a legacy HTML4 document. Traditional HTML elements like &lt;b&gt;, &lt;i&gt;, and &lt;font&gt; are used in place of &lt;strong&gt;, &lt;em&gt; and CSS styles. </div> <hr /> <form action="../php/sampleposteddata.php" method="post" target="_blank"> <script type="text/javascript"> <!-- // Automatically calculates the editor base path based on the _samples directory. // This is usefull only for these samples. A real application should use something like this: // oFCKeditor.BasePath = '/fckeditor/' ; // '/fckeditor/' is the default value. var sBasePath = document.location.href.substring(0,document.location.href.lastIndexOf('_samples')) ; var oFCKeditor = new FCKeditor( 'FCKeditor1' ) ; oFCKeditor.BasePath = sBasePath ; // Instruct the editor to load our configurations from a custom file, leaving the // original configuration file untouched. oFCKeditor.Config['CustomConfigurationsPath'] = sBasePath + '_samples/html/assets/sample15.config.js' ; oFCKeditor.Height = 300 ; oFCKeditor.Value = '<p>This is some <b>sample text<\/b>. You are using <a href="http://www.fckeditor.net/">FCKeditor<\/a>.<\/p>' ; oFCKeditor.Create() ; //--> </script> <br /> <input type="submit" value="Submit" /> </form> </body> </html>
10npsite
trunk/guanli/system/fckeditor/_samples/html/sample15.html
HTML
asf20
2,516
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <!-- * FCKeditor - The text editor for Internet - http://www.fckeditor.net * Copyright (C) 2003-2009 Frederico Caldeira Knabben * * == BEGIN LICENSE == * * Licensed under the terms of any of the following licenses at your * choice: * * - GNU General Public License Version 2 or later (the "GPL") * http://www.gnu.org/licenses/gpl.html * * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") * http://www.gnu.org/licenses/lgpl.html * * - Mozilla Public License Version 1.1 or later (the "MPL") * http://www.mozilla.org/MPL/MPL-1.1.html * * == END LICENSE == * * Sample page. --> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>FCKeditor - Sample</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <meta name="robots" content="noindex, nofollow" /> <link href="../sample.css" rel="stylesheet" type="text/css" /> <script type="text/javascript" src="../../fckeditor.js"></script> <script type="text/javascript"> function FCKeditor_OnComplete( editorInstance ) { editorInstance.Events.AttachEvent( 'OnBlur' , FCKeditor_OnBlur ) ; editorInstance.Events.AttachEvent( 'OnFocus', FCKeditor_OnFocus ) ; } function FCKeditor_OnBlur( editorInstance ) { editorInstance.ToolbarSet.Collapse() ; } function FCKeditor_OnFocus( editorInstance ) { editorInstance.ToolbarSet.Expand() ; } </script> </head> <body> <h1> FCKeditor - JavaScript - Sample 9</h1> <div> This sample shows FCKeditor in a more complex form with two different instances.<br /> It also shows and interesting usage of the "OnFocus" and "OnBlur" events available in the JavaScript API. </div> <hr /> <form action="../php/sampleposteddata.php" method="post" target="_blank"> Normal text field:<br /> <input name="NormaText" value="Plain Text" /> <br /> <br /> FCKeditor with Basic toolbar: <script type="text/javascript"> <!-- // Automatically calculates the editor base path based on the _samples directory. // This is usefull only for these samples. A real application should use something like this: // oFCKeditor.BasePath = '/fckeditor/' ; // '/fckeditor/' is the default value. var sBasePath = document.location.href.substring(0,document.location.href.lastIndexOf('_samples')) ; var oFCKeditor = new FCKeditor( 'FCKeditor_Basic' ) ; oFCKeditor.Config['ToolbarStartExpanded'] = false ; oFCKeditor.BasePath = sBasePath ; oFCKeditor.ToolbarSet = 'Basic' ; oFCKeditor.Value = '<p>This is some <strong>sample text<\/strong>. You are using <a href="http://www.fckeditor.net/">FCKeditor<\/a>.<\/p>' ; oFCKeditor.Create() ; //--> </script> <br /> FCKeditor with Default toolbar: <script type="text/javascript"> <!-- oFCKeditor = new FCKeditor( 'FCKeditor_Default' ) ; oFCKeditor.Config['ToolbarStartExpanded'] = false ; oFCKeditor.BasePath = sBasePath ; oFCKeditor.Value = '<p>This is some <strong>sample text<\/strong>. You are using <a href="http://www.fckeditor.net/">FCKeditor<\/a>.<\/p>' ; oFCKeditor.Create() ; //--> </script> <br /> <input type="submit" value="Submit" /> </form> </body> </html>
10npsite
trunk/guanli/system/fckeditor/_samples/html/sample09.html
HTML
asf20
3,320
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <!-- * FCKeditor - The text editor for Internet - http://www.fckeditor.net * Copyright (C) 2003-2009 Frederico Caldeira Knabben * * == BEGIN LICENSE == * * Licensed under the terms of any of the following licenses at your * choice: * * - GNU General Public License Version 2 or later (the "GPL") * http://www.gnu.org/licenses/gpl.html * * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") * http://www.gnu.org/licenses/lgpl.html * * - Mozilla Public License Version 1.1 or later (the "MPL") * http://www.mozilla.org/MPL/MPL-1.1.html * * == END LICENSE == * * Sample page. --> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>FCKeditor - Sample</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <meta name="robots" content="noindex, nofollow" /> <link href="../sample.css" rel="stylesheet" type="text/css" /> <script type="text/javascript" src="../../fckeditor.js"></script> </head> <body> <h1> FCKeditor - JavaScript - 6</h1> <div> This sample shows some sample plugins implementations. Things to note:<br /> <ul> <li>In the toolbar, you will find sample "Find" and "Replace" plugins that do exactly the same thing that the built in ones do. It just shows how to do that with a custom implementation. Use the green toolbar buttons the test then. </li> <li>There is also another sample plugin that is available in the package: the "Placeholder" command (use the yellow icon). </li> <li>It also shows a custom context menu option when right cliking on images (insert a smiley to test it).</li> </ul> </div> <hr /> <form action="../php/sampleposteddata.php" method="post" target="_blank"> <script type="text/javascript"> <!-- // Automatically calculates the editor base path based on the _samples directory. // This is usefull only for these samples. A real application should use something like this: // oFCKeditor.BasePath = '/fckeditor/' ; // '/fckeditor/' is the default value. var sBasePath = document.location.href.substring(0,document.location.href.lastIndexOf('_samples')) ; var oFCKeditor = new FCKeditor( 'FCKeditor1' ) ; oFCKeditor.BasePath = sBasePath ; // Set the custom configurations file path (in this way the original file is mantained). oFCKeditor.Config['CustomConfigurationsPath'] = sBasePath + '_samples/html/assets/sample06.config.js' ; // Let's use a custom toolbar for this sample. oFCKeditor.ToolbarSet = 'PluginTest' ; oFCKeditor.Value = '<p>This is some <strong>sample text<\/strong>. You are using <a href="http://www.fckeditor.net/">FCKeditor<\/a>.<\/p>' ; oFCKeditor.Create() ; //--> </script> <br /> <input type="submit" value="Submit" /> </form> </body> </html>
10npsite
trunk/guanli/system/fckeditor/_samples/html/sample06.html
HTML
asf20
2,932
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <!-- * FCKeditor - The text editor for Internet - http://www.fckeditor.net * Copyright (C) 2003-2009 Frederico Caldeira Knabben * * == BEGIN LICENSE == * * Licensed under the terms of any of the following licenses at your * choice: * * - GNU General Public License Version 2 or later (the "GPL") * http://www.gnu.org/licenses/gpl.html * * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") * http://www.gnu.org/licenses/lgpl.html * * - Mozilla Public License Version 1.1 or later (the "MPL") * http://www.mozilla.org/MPL/MPL-1.1.html * * == END LICENSE == * * Sample page. --> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>FCKeditor - Sample</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <meta name="robots" content="noindex, nofollow" /> <link href="../sample.css" rel="stylesheet" type="text/css" /> <script type="text/javascript" src="../../fckeditor.js"></script> <script type="text/javascript"> <!-- // FCKeditor_OnComplete is a special function that is called when an editor // instance is loaded ad available to the API. It must be named exactly in // this way. function FCKeditor_OnComplete( editorInstance ) { // Show the editor name and description in the browser status bar. document.getElementById('eMessage').innerHTML = 'Instance "' + editorInstance.Name + '" loaded - ' + editorInstance.Description ; // Show this sample buttons. document.getElementById('eButtons').style.visibility = '' ; } function InsertHTML() { // Get the editor instance that we want to interact with. var oEditor = FCKeditorAPI.GetInstance('FCKeditor1') ; // Check the active editing mode. if ( oEditor.EditMode == FCK_EDITMODE_WYSIWYG ) { // Insert the desired HTML. oEditor.InsertHtml( '- This is some <a href="/Test1.html">sample<\/a> HTML -' ) ; } else alert( 'You must be on WYSIWYG mode!' ) ; } function SetContents() { // Get the editor instance that we want to interact with. var oEditor = FCKeditorAPI.GetInstance('FCKeditor1') ; // Set the editor contents (replace the actual one). oEditor.SetData( 'This is the <b>new content<\/b> I want in the editor.' ) ; } function GetContents() { // Get the editor instance that we want to interact with. var oEditor = FCKeditorAPI.GetInstance('FCKeditor1') ; // Get the editor contents in XHTML. alert( oEditor.GetXHTML( true ) ) ; // "true" means you want it formatted. } function ExecuteCommand( commandName ) { // Get the editor instance that we want to interact with. var oEditor = FCKeditorAPI.GetInstance('FCKeditor1') ; // Execute the command. oEditor.Commands.GetCommand( commandName ).Execute() ; } function GetLength() { // This functions shows that you can interact directly with the editor area // DOM. In this way you have the freedom to do anything you want with it. // Get the editor instance that we want to interact with. var oEditor = FCKeditorAPI.GetInstance('FCKeditor1') ; // Get the Editor Area DOM (Document object). var oDOM = oEditor.EditorDocument ; var iLength ; // The are two diffent ways to get the text (without HTML markups). // It is browser specific. if ( document.all ) // If Internet Explorer. { iLength = oDOM.body.innerText.length ; } else // If Gecko. { var r = oDOM.createRange() ; r.selectNodeContents( oDOM.body ) ; iLength = r.toString().length ; } alert( 'Actual text length (without HTML markups): ' + iLength + ' characters' ) ; } function GetInnerHTML() { // Get the editor instance that we want to interact with. var oEditor = FCKeditorAPI.GetInstance('FCKeditor1') ; alert( oEditor.EditorDocument.body.innerHTML ) ; } function CheckIsDirty() { // Get the editor instance that we want to interact with. var oEditor = FCKeditorAPI.GetInstance('FCKeditor1') ; alert( oEditor.IsDirty() ) ; } function ResetIsDirty() { // Get the editor instance that we want to interact with. var oEditor = FCKeditorAPI.GetInstance('FCKeditor1') ; oEditor.ResetIsDirty() ; alert( 'The "IsDirty" status has been reset' ) ; } --> </script> </head> <body> <h1> FCKeditor - JavaScript - Sample 8 </h1> <div> This sample shows how to use the FCKeditor JavaScript API to interact with the editor at runtime. </div> <hr /> <form action="../php/sampleposteddata.php" method="post" target="_blank"> <script type="text/javascript"> <!-- // Automatically calculates the editor base path based on the _samples directory. // This is usefull only for these samples. A real application should use something like this: // oFCKeditor.BasePath = '/fckeditor/' ; // '/fckeditor/' is the default value. var sBasePath = document.location.href.substring(0,document.location.href.lastIndexOf('_samples')) ; var oFCKeditor = new FCKeditor( 'FCKeditor1' ) ; oFCKeditor.BasePath = sBasePath ; oFCKeditor.Value = '<p>This is some <strong>sample text<\/strong>. You are using <a href="http://www.fckeditor.net/">FCKeditor<\/a>.<\/p>' ; oFCKeditor.Create() ; //--> </script> <br /> <input type="submit" value="Submit" /> </form> <div> &nbsp; </div> <hr /> <div id="eMessage"> &nbsp; </div> <div> &nbsp; </div> <div id="eButtons" style="visibility: hidden"> <input type="button" value="Insert HTML" onclick="InsertHTML();" /> <input type="button" value="Set Editor Contents" onclick="SetContents();" /> <input type="button" value="Get Editor Contents (XHTML)" onclick="GetContents();" /> <br /> <br /> <input type="button" value='Execute "Bold" Command' onclick="ExecuteCommand('Bold');" /> <input type="button" value='Execute "Link" Command' onclick="ExecuteCommand('Link');" /> <br /> <br /> <input type="button" value="Interact with the Editor Area DOM" onclick="GetLength();" /> <input type="button" value="Get innerHTML" onclick="GetInnerHTML();" /> <br /> <br /> <input type="button" value="Check IsDirty()" onclick="CheckIsDirty();" /> <input type="button" value="Reset IsDirty()" onclick="ResetIsDirty();" /> </div> </body> </html>
10npsite
trunk/guanli/system/fckeditor/_samples/html/sample08.html
HTML
asf20
6,352
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <!-- * FCKeditor - The text editor for Internet - http://www.fckeditor.net * Copyright (C) 2003-2009 Frederico Caldeira Knabben * * == BEGIN LICENSE == * * Licensed under the terms of any of the following licenses at your * choice: * * - GNU General Public License Version 2 or later (the "GPL") * http://www.gnu.org/licenses/gpl.html * * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") * http://www.gnu.org/licenses/lgpl.html * * - Mozilla Public License Version 1.1 or later (the "MPL") * http://www.mozilla.org/MPL/MPL-1.1.html * * == END LICENSE == * * Sample page. --> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>FCKeditor - Sample</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <meta name="robots" content="noindex, nofollow" /> <link href="../sample.css" rel="stylesheet" type="text/css" /> <script type="text/javascript" src="../../fckeditor.js"></script> <script type="text/javascript" src="assets/swfobject.js"></script> <script type="text/javascript"> function sendToFlash() { var html = FCKeditorAPI.GetInstance( 'FCKeditor1' ).GetData() ; var flash = document.getElementById( 'fckFlash' ) ; flash.setData( html ) ; } function init() { var so = new SWFObject("assets/sample16.swf", "fckFlash", "550", "400", "8", "#ffffff") ; so.addParam("wmode", "transparent"); so.write("fckFlashContainer") ; } </script> </head> <body onload="init();"> <h1> FCKeditor - JavaScript - Sample 16 </h1> <div> This sample shows FCKeditor configured to produce HTML code that can be used with <a href="http://kb.adobe.com/selfservice/viewContent.do?externalId=tn_14808#TextArea_Component"> Flash</a>. </div> <hr /> <table width="100%" cellpadding="0" cellspacing="0"> <tr> <td style="width: 100%"> <script type="text/javascript"> <!-- if ( document.location.protocol == 'file:' ) alert( 'Warning: This samples does not work when loaded from local filesystem due to security restrictions implemented in Flash.' + '\n\nPlease load the sample from a web server instead.') ; // Automatically calculates the editor base path based on the _samples directory. // This is usefull only for these samples. A real application should use something like this: // oFCKeditor.BasePath = '/fckeditor/' ; // '/fckeditor/' is the default value. var sBasePath = document.location.href.substring(0,document.location.href.lastIndexOf('_samples')) ; var oFCKeditor = new FCKeditor( 'FCKeditor1' ) ; oFCKeditor.BasePath = sBasePath ; // Instruct the editor to load our configurations from a custom file, leaving the // original configuration file untouched. oFCKeditor.Config['CustomConfigurationsPath'] = sBasePath + '_samples/html/assets/sample16.config.js' ; oFCKeditor.Height = 400 ; oFCKeditor.Width = '100%' ; oFCKeditor.ToolbarSet = 'Flash' ; oFCKeditor.Value = '<p>This is some <b>sample text<\/b>. You are using <a href="http://www.fckeditor.net/">FCKeditor<\/a>.<\/p>' ; oFCKeditor.Create() ; //--> </script> <input type="button" value="Send to Flash" onclick="sendToFlash();" /> </td> <td valign="top" style="padding-left: 15px" id="fckFlashContainer"> </td> </tr> </table> </body> </html>
10npsite
trunk/guanli/system/fckeditor/_samples/html/sample16.html
HTML
asf20
3,452
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <!-- * FCKeditor - The text editor for Internet - http://www.fckeditor.net * Copyright (C) 2003-2009 Frederico Caldeira Knabben * * == BEGIN LICENSE == * * Licensed under the terms of any of the following licenses at your * choice: * * - GNU General Public License Version 2 or later (the "GPL") * http://www.gnu.org/licenses/gpl.html * * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") * http://www.gnu.org/licenses/lgpl.html * * - Mozilla Public License Version 1.1 or later (the "MPL") * http://www.mozilla.org/MPL/MPL-1.1.html * * == END LICENSE == * * Sample page. --> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>FCKeditor - Sample</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <meta name="robots" content="noindex, nofollow" /> <link href="../sample.css" rel="stylesheet" type="text/css" /> <script type="text/javascript" src="../../fckeditor.js"></script> <script type="text/javascript"> function FCKeditor_OnComplete( editorInstance ) { var oCombo = document.getElementById( 'cmbSkins' ) ; // Get the active skin. var sSkin = editorInstance.Config['SkinPath'] ; sSkin = sSkin.match( /[^\/]+(?=\/$)/g ) ; oCombo.value = sSkin ; oCombo.style.visibility = '' ; } function ChangeLanguage( languageCode ) { document.location.href = document.location.href.replace( /\?.*$/, '' ) + "?" + languageCode ; } </script> </head> <body> <h1> FCKeditor - JavaScript - Sample 5</h1> <div> This sample shows how to change the editor skin. </div> <hr /> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td> Select the skin to load:&nbsp; </td> <td> <select id="cmbSkins" onchange="ChangeLanguage(this.value);" style="visibility: hidden"> <option value="default" selected="selected">Default</option> <option value="office2003">Office 2003</option> <option value="silver">Silver</option> </select> </td> </tr> </table> <br /> <form action="../php/sampleposteddata.php" method="post" target="_blank"> <script type="text/javascript"> <!-- // Automatically calculates the editor base path based on the _samples directory. // This is usefull only for these samples. A real application should use something like this: // oFCKeditor.BasePath = '/fckeditor/' ; // '/fckeditor/' is the default value. var sBasePath = document.location.href.substring(0,document.location.href.lastIndexOf('_samples')) ; // Get the skin from the URL. var sSkin ; if ( document.location.search.length > 1 ) sSkin = document.location.search.substr(1) ; var oFCKeditor = new FCKeditor( 'FCKeditor1' ) ; oFCKeditor.BasePath = sBasePath ; if ( sSkin != null ) { var sSkinPath = sBasePath + 'editor/skins/' + sSkin + '/' ; oFCKeditor.Config['SkinPath'] = sSkinPath ; // The following switch is optional. It is done to enhance the loading // time of the toolbar, by preloading the images used on it. switch ( sSkin ) { case 'office2003' : oFCKeditor.Config['PreloadImages'] = sSkinPath + 'images/toolbar.start.gif' + ';' + sSkinPath + 'images/toolbar.end.gif' + ';' + sSkinPath + 'images/toolbar.bg.gif' + ';' + sSkinPath + 'images/toolbar.buttonarrow.gif' ; break ; case 'silver' : oFCKeditor.Config['PreloadImages'] = sSkinPath + 'images/toolbar.start.gif' + ';' + sSkinPath + 'images/toolbar.end.gif' + ';' + sSkinPath + 'images/toolbar.buttonbg.gif' + ';' + sSkinPath + 'images/toolbar.buttonarrow.gif' ; break ; } } oFCKeditor.Value = '<p>This is some <strong>sample text<\/strong>. You are using <a href="http://www.fckeditor.net/">FCKeditor<\/a>.<\/p>' ; oFCKeditor.Create() ; //--> </script> <br /> <input type="submit" value="Submit" /> </form> </body> </html>
10npsite
trunk/guanli/system/fckeditor/_samples/html/sample05.html
HTML
asf20
4,024
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <!-- * FCKeditor - The text editor for Internet - http://www.fckeditor.net * Copyright (C) 2003-2009 Frederico Caldeira Knabben * * == BEGIN LICENSE == * * Licensed under the terms of any of the following licenses at your * choice: * * - GNU General Public License Version 2 or later (the "GPL") * http://www.gnu.org/licenses/gpl.html * * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") * http://www.gnu.org/licenses/lgpl.html * * - Mozilla Public License Version 1.1 or later (the "MPL") * http://www.mozilla.org/MPL/MPL-1.1.html * * == END LICENSE == * * Sample page. --> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>FCKeditor - Sample</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <meta name="robots" content="noindex, nofollow" /> <link href="../sample.css" rel="stylesheet" type="text/css" /> <script type="text/javascript" src="../../fckeditor.js"></script> <script type="text/javascript"> function Toggle() { // Try to get the FCKeditor instance, if available. var oEditor ; if ( typeof( FCKeditorAPI ) != 'undefined' ) oEditor = FCKeditorAPI.GetInstance( 'DataFCKeditor' ) ; // Get the _Textarea and _FCKeditor DIVs. var eTextareaDiv = document.getElementById( 'Textarea' ) ; var eFCKeditorDiv = document.getElementById( 'FCKeditor' ) ; // If the _Textarea DIV is visible, switch to FCKeditor. if ( eTextareaDiv.style.display != 'none' ) { // If it is the first time, create the editor. if ( !oEditor ) { CreateEditor() ; } else { // Set the current text in the textarea to the editor. oEditor.SetData( document.getElementById('DataTextarea').value ) ; } // Switch the DIVs display. eTextareaDiv.style.display = 'none' ; eFCKeditorDiv.style.display = '' ; // This is a hack for Gecko 1.0.x ... it stops editing when the editor is hidden. if ( oEditor && !document.all ) { if ( oEditor.EditMode == FCK_EDITMODE_WYSIWYG ) oEditor.MakeEditable() ; } } else { // Set the textarea value to the editor value. document.getElementById('DataTextarea').value = oEditor.GetXHTML() ; // Switch the DIVs display. eTextareaDiv.style.display = '' ; eFCKeditorDiv.style.display = 'none' ; } } function CreateEditor() { // Copy the value of the current textarea, to the textarea that will be used by the editor. document.getElementById('DataFCKeditor').value = document.getElementById('DataTextarea').value ; // Automatically calculates the editor base path based on the _samples directory. // This is usefull only for these samples. A real application should use something like this: // oFCKeditor.BasePath = '/fckeditor/' ; // '/fckeditor/' is the default value. var sBasePath = document.location.href.substring(0,document.location.href.lastIndexOf('_samples')) ; // Create an instance of FCKeditor (using the target textarea as the name). var oFCKeditor = new FCKeditor( 'DataFCKeditor' ) ; oFCKeditor.BasePath = sBasePath ; oFCKeditor.Width = '100%' ; oFCKeditor.Height = '350' ; oFCKeditor.ReplaceTextarea() ; } // The FCKeditor_OnComplete function is a special function called everytime an // editor instance is completely loaded and available for API interactions. function FCKeditor_OnComplete( editorInstance ) { // Enable the switch button. It is disabled at startup, waiting the editor to be loaded. document.getElementById('BtnSwitchTextarea').disabled = false ; } function PrepareSave() { // If the textarea isn't visible update the content from the editor. if ( document.getElementById( 'Textarea' ).style.display == 'none' ) { var oEditor = FCKeditorAPI.GetInstance( 'DataFCKeditor' ) ; document.getElementById( 'DataTextarea' ).value = oEditor.GetXHTML() ; } } </script> </head> <body> <h1> FCKeditor - JavaScript - Sample 13 </h1> <div> This sample starts with a normal textarea and provides the ability to switch back and forth between the textarea and FCKeditor. It uses the JavaScript API to do the operations so it will work even if the internal implementation changes. </div> <hr /> <form action="../php/sampleposteddata.php" method="post" target="_blank" onsubmit="PrepareSave();"> <div id="Textarea"> <input type="button" value="Switch to FCKeditor" onclick="Toggle()" /> <br /> <br /> <textarea id="DataTextarea" name="Data" cols="80" rows="20" style="width: 95%">This is some &lt;strong&gt;sample text&lt;/strong&gt;. You are using &lt;a href="http://www.fckeditor.net/"&gt;FCKeditor&lt;/a&gt;.</textarea> </div> <div id="FCKeditor" style="display: none"> <!-- Note that the following button is disabled at startup. It will be enabled once the editor is completely loaded. --> <input id="BtnSwitchTextarea" type="button" disabled="disabled" value="Switch to Textarea" onclick="Toggle()" /> <br /> <br /> <!-- Note that the following textarea doesn't have a "name", so it will not be posted. --> <textarea id="DataFCKeditor" cols="80" rows="20"></textarea> </div> <br /> <input type="submit" value="Submit" /> </form> </body> </html>
10npsite
trunk/guanli/system/fckeditor/_samples/html/sample13.html
HTML
asf20
5,390
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <!-- * FCKeditor - The text editor for Internet - http://www.fckeditor.net * Copyright (C) 2003-2009 Frederico Caldeira Knabben * * == BEGIN LICENSE == * * Licensed under the terms of any of the following licenses at your * choice: * * - GNU General Public License Version 2 or later (the "GPL") * http://www.gnu.org/licenses/gpl.html * * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") * http://www.gnu.org/licenses/lgpl.html * * - Mozilla Public License Version 1.1 or later (the "MPL") * http://www.mozilla.org/MPL/MPL-1.1.html * * == END LICENSE == * * Sample page. --> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>FCKeditor - Sample</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <meta name="robots" content="noindex, nofollow" /> <link href="../sample.css" rel="stylesheet" type="text/css" /> <script type="text/javascript" src="../../fckeditor.js"></script> <script type="text/javascript"> <!-- // The following function is used in this samples to reload the page, // setting the querystring parameters for the enter mode. function ChangeMode() { var sEnterMode = document.getElementById('xEnter').value ; var sShiftEnterMode = document.getElementById('xShiftEnter').value ; window.location.href = window.location.pathname + '?enter=' + sEnterMode + '&shift=' + sShiftEnterMode ; } --> </script> </head> <body> <h1> FCKeditor - JavaScript - Sample 12</h1> <div> This sample shows the different ways to configure the [Enter] key behavior on FCKeditor. </div> <hr /> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td> When [Enter] is pressed:&nbsp; </td> <td> <select id="xEnter" onchange="ChangeMode();"> <option value="p" selected="selected">Create new &lt;P&gt;</option> <option value="div">Create new &lt;DIV&gt;</option> <option value="br">Break the line with a &lt;BR&gt;</option> </select> </td> </tr> <tr> <td> When [Shift] + [Enter] is pressed:&nbsp; </td> <td> <select id="xShiftEnter" onchange="ChangeMode();"> <option value="p">Create new &lt;P&gt;</option> <option value="div">Create new &lt;DIV&gt;</option> <option value="br" selected="selected">Break the line with a &lt;BR&gt;</option> </select> </td> </tr> </table> <br /> <form action="../php/sampleposteddata.php" method="post" target="_blank"> <script type="text/javascript"> <!-- // Automatically calculates the editor base path based on the _samples directory. // This is usefull only for these samples. A real application should use something like this: // oFCKeditor.BasePath = '/fckeditor/' ; // '/fckeditor/' is the default value. var sBasePath = document.location.href.substring(0,document.location.href.lastIndexOf('_samples')) ; // The following are the default configurations for the Enter and Shift+Enter modes. var sEnterMode = 'p' ; var sShiftEnterMode = 'br' ; // Try to get the new configurations from the querystring, if available. if ( document.location.search.length > 1 ) { var aMatch = document.location.search.match( /enter=(p|div|br)/ ) ; if ( aMatch ) sEnterMode = aMatch[1] ; aMatch = document.location.search.match( /shift=(p|div|br)/ ) ; if ( aMatch ) sShiftEnterMode = aMatch[1] ; } // Create the FCKeditor instance. var oFCKeditor = new FCKeditor( 'FCKeditor1' ) ; oFCKeditor.BasePath = sBasePath ; oFCKeditor.Value = 'This is some <strong>sample text<\/strong>. You are using <a href="http://www.fckeditor.net/">FCKeditor<\/a>.' ; // Set the configuration options for the Enter Key mode. oFCKeditor.Config["EnterMode"] = sEnterMode ; oFCKeditor.Config["ShiftEnterMode"] = sShiftEnterMode ; oFCKeditor.Create() ; // Update the select combos with the current values. document.getElementById('xEnter').value = sEnterMode ; document.getElementById('xShiftEnter').value = sShiftEnterMode ; //--> </script> <br /> <input type="submit" value="Submit" /> </form> </body> </html>
10npsite
trunk/guanli/system/fckeditor/_samples/html/sample12.html
HTML
asf20
4,265
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <!-- * FCKeditor - The text editor for Internet - http://www.fckeditor.net * Copyright (C) 2003-2009 Frederico Caldeira Knabben * * == BEGIN LICENSE == * * Licensed under the terms of any of the following licenses at your * choice: * * - GNU General Public License Version 2 or later (the "GPL") * http://www.gnu.org/licenses/gpl.html * * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") * http://www.gnu.org/licenses/lgpl.html * * - Mozilla Public License Version 1.1 or later (the "MPL") * http://www.mozilla.org/MPL/MPL-1.1.html * * == END LICENSE == * * Sample page. --> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>FCKeditor - Sample</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <meta name="robots" content="noindex, nofollow" /> <link href="../sample.css" rel="stylesheet" type="text/css" /> <script type="text/javascript" src="../../fckeditor.js"></script> </head> <body> <h1> FCKeditor - JavaScript - Sample 10</h1> <div> This sample shows a form with two FCKeditor instance. Both instances share the same toolbar, available in the top. </div> <hr /> <div id="xToolbar"></div> <hr /> <form action="../php/sampleposteddata.php" method="post" target="_blank"> Normal text field:<br /> <input name="NormaText" value="Plain Text" /> <br /> <br /> FCKeditor 1: <script type="text/javascript"> <!-- // Automatically calculates the editor base path based on the _samples directory. // This is usefull only for these samples. A real application should use something like this: // oFCKeditor.BasePath = '/fckeditor/' ; // '/fckeditor/' is the default value. var sBasePath = document.location.href.substring(0,document.location.href.lastIndexOf('_samples')) ; var oFCKeditor = new FCKeditor( 'FCKeditor_1' ) ; oFCKeditor.BasePath = sBasePath ; oFCKeditor.Height = 100 ; oFCKeditor.Config[ 'ToolbarLocation' ] = 'Out:xToolbar' ; oFCKeditor.Value = '<p>This is some <strong>sample text<\/strong>. You are using <a href="http://www.fckeditor.net/">FCKeditor<\/a>.<\/p>' ; oFCKeditor.Create() ; //--> </script> <br /> FCKeditor 2: <script type="text/javascript"> <!-- oFCKeditor = new FCKeditor( 'FCKeditor_2' ) ; oFCKeditor.BasePath = sBasePath ; oFCKeditor.Height = 100 ; oFCKeditor.Config[ 'ToolbarLocation' ] = 'Out:xToolbar' ; oFCKeditor.Value = '<p>This is some <strong>sample text<\/strong>. You are using <a href="http://www.fckeditor.net/">FCKeditor<\/a>.<\/p>' ; oFCKeditor.Create() ; //--> </script> <br /> <input type="submit" value="Submit" /> </form> </body> </html>
10npsite
trunk/guanli/system/fckeditor/_samples/html/sample10.html
HTML
asf20
2,821
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <!-- * FCKeditor - The text editor for Internet - http://www.fckeditor.net * Copyright (C) 2003-2009 Frederico Caldeira Knabben * * == BEGIN LICENSE == * * Licensed under the terms of any of the following licenses at your * choice: * * - GNU General Public License Version 2 or later (the "GPL") * http://www.gnu.org/licenses/gpl.html * * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") * http://www.gnu.org/licenses/lgpl.html * * - Mozilla Public License Version 1.1 or later (the "MPL") * http://www.mozilla.org/MPL/MPL-1.1.html * * == END LICENSE == * * Sample page. --> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>FCKeditor - Sample</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <meta name="robots" content="noindex, nofollow" /> <link href="../sample.css" rel="stylesheet" type="text/css" /> <script type="text/javascript" src="../../fckeditor.js"></script> </head> <body> <h1> FCKeditor - JavaScript - Sample 14 </h1> <div> This sample shows FCKeditor configured to produce <strong>XHTML 1.1</strong> compliant HTML. Deprecated elements or attributes, like the &lt;font&gt; and &lt;u&gt; elements or the "style" attribute, are avoided. </div> <hr /> <form action="../php/sampleposteddata.php" method="post" target="_blank"> <script type="text/javascript"> <!-- // Automatically calculates the editor base path based on the _samples directory. // This is usefull only for these samples. A real application should use something like this: // oFCKeditor.BasePath = '/fckeditor/' ; // '/fckeditor/' is the default value. var sBasePath = document.location.href.substring(0,document.location.href.lastIndexOf('_samples')) ; var oFCKeditor = new FCKeditor( 'FCKeditor1' ) ; oFCKeditor.BasePath = sBasePath ; // Instruct the editor to load our configurations from a custom file, leaving the // original configuration file untouched. oFCKeditor.Config['CustomConfigurationsPath'] = sBasePath + '_samples/html/assets/sample14.config.js' ; oFCKeditor.Height = 300 ; oFCKeditor.Value = '<p>This is some <span class="Bold">sample text<\/span>. You are using <a href="http://www.fckeditor.net/">FCKeditor<\/a>.<\/p>' ; oFCKeditor.Create() ; //--> </script> <br /> <input type="submit" value="Submit" /> </form> </body> </html>
10npsite
trunk/guanli/system/fckeditor/_samples/html/sample14.html
HTML
asf20
2,538
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <!-- * FCKeditor - The text editor for Internet - http://www.fckeditor.net * Copyright (C) 2003-2009 Frederico Caldeira Knabben * * == BEGIN LICENSE == * * Licensed under the terms of any of the following licenses at your * choice: * * - GNU General Public License Version 2 or later (the "GPL") * http://www.gnu.org/licenses/gpl.html * * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") * http://www.gnu.org/licenses/lgpl.html * * - Mozilla Public License Version 1.1 or later (the "MPL") * http://www.mozilla.org/MPL/MPL-1.1.html * * == END LICENSE == * * Sample page. --> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>FCKeditor - Sample</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <meta name="robots" content="noindex, nofollow" /> <link href="../sample.css" rel="stylesheet" type="text/css" /> <script type="text/javascript" src="../../fckeditor.js"></script> </head> <body> <h1> FCKeditor - JavaScript - Sample 7</h1> <div> In this sample the user can edit the complete page contents and header (from &lt;HTML&gt; to &lt;/HTML&gt;). </div> <hr /> <form action="../php/sampleposteddata.php" method="post" target="_blank"> <script type="text/javascript"> <!-- // Automatically calculates the editor base path based on the _samples directory. // This is usefull only for these samples. A real application should use something like this: // oFCKeditor.BasePath = '/fckeditor/' ; // '/fckeditor/' is the default value. var sBasePath = document.location.href.substring(0,document.location.href.lastIndexOf('_samples')) ; var oFCKeditor = new FCKeditor( 'FCKeditor1' ) ; oFCKeditor.BasePath = sBasePath ; oFCKeditor.Config['FullPage'] = true ; oFCKeditor.Value = '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html><head><title>Full Page Test<\/title><meta content="text/html; charset=utf-8" http-equiv="Content-Type"><\/head><body><p>This is some <strong>sample text<\/strong>. You are using <a href="http://www.fckeditor.net/">FCKeditor<\/a>.<\/body><\/html>' ; oFCKeditor.Create() ; //--> </script> <br /> <input type="submit" value="Submit" /> </form> </body> </html>
10npsite
trunk/guanli/system/fckeditor/_samples/html/sample07.html
HTML
asf20
2,394
/* * FCKeditor - The text editor for Internet - http://www.fckeditor.net * Copyright (C) 2003-2009 Frederico Caldeira Knabben * * == BEGIN LICENSE == * * Licensed under the terms of any of the following licenses at your * choice: * * - GNU General Public License Version 2 or later (the "GPL") * http://www.gnu.org/licenses/gpl.html * * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") * http://www.gnu.org/licenses/lgpl.html * * - Mozilla Public License Version 1.1 or later (the "MPL") * http://www.mozilla.org/MPL/MPL-1.1.html * * == END LICENSE == * * Styles used by the XHTML 1.1 sample page (sample14.html). */ /** * Basic definitions for the editing area. */ body { background-color: #ffffff; padding: 5px 5px 5px 5px; margin: 0px; } body, td { font-family: Arial, Verdana, sans-serif; font-size: 12px; } a[href] { color: #0000FF !important; /* For Firefox... mark as important, otherwise it becomes black */ } /** * Core styles. */ .Bold { font-weight: bold; } .Italic { font-style: italic; } .Underline { text-decoration: underline; } .StrikeThrough { text-decoration: line-through; } .Subscript { vertical-align: sub; font-size: smaller; } .Superscript { vertical-align: super; font-size: smaller; } /** * Font faces. */ .FontComic { font-family: 'Comic Sans MS'; } .FontCourier { font-family: 'Courier New'; } .FontTimes { font-family: 'Times New Roman'; } /** * Font sizes. */ .FontSmaller { font-size: smaller; } .FontLarger { font-size: larger; } .FontSmall { font-size: 8pt; } .FontBig { font-size: 14pt; } .FontDouble { font-size: 200%; } /** * Font colors. */ .FontColor1 { color: #ff9900; } .FontColor2 { color: #0066cc; } .FontColor3 { color: #ff0000; } .FontColor1BG { background-color: #ff9900; } .FontColor2BG { background-color: #0066cc; } .FontColor3BG { background-color: #ff0000; } /** * Indentation. */ .Indent1 { margin-left: 40px; } .Indent2 { margin-left: 80px; } .Indent3 { margin-left: 120px; } /** * Alignment. */ .JustifyLeft { text-align: left; } .JustifyRight { text-align: right; } .JustifyCenter { text-align: center; } .JustifyFull { text-align: justify; } /** * Other. */ code { font-family: courier, monospace; background-color: #eeeeee; padding-left: 1px; padding-right: 1px; border: #c0c0c0 1px solid; } kbd { padding: 0px 1px 0px 1px; border-width: 1px 2px 2px 1px; border-style: solid; } blockquote { color: #808080; }
10npsite
trunk/guanli/system/fckeditor/_samples/html/assets/sample14.styles.css
CSS
asf20
2,745
/* * FCKeditor - The text editor for Internet - http://www.fckeditor.net * Copyright (C) 2003-2009 Frederico Caldeira Knabben * * == BEGIN LICENSE == * * Licensed under the terms of any of the following licenses at your * choice: * * - GNU General Public License Version 2 or later (the "GPL") * http://www.gnu.org/licenses/gpl.html * * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") * http://www.gnu.org/licenses/lgpl.html * * - Mozilla Public License Version 1.1 or later (the "MPL") * http://www.mozilla.org/MPL/MPL-1.1.html * * == END LICENSE == * * Sample custom configuration settings used in the plugin sample page (sample06). */ // Set our sample toolbar. FCKConfig.ToolbarSets['PluginTest'] = [ ['SourceSimple'], ['My_Find','My_Replace','-','Placeholder'], ['StyleSimple','FontFormatSimple','FontNameSimple','FontSizeSimple'], ['Table','-','TableInsertRowAfter','TableDeleteRows','TableInsertColumnAfter','TableDeleteColumns','TableInsertCellAfter','TableDeleteCells','TableMergeCells','TableHorizontalSplitCell','TableCellProp'], ['Bold','Italic','-','OrderedList','UnorderedList','-','Link','Unlink'], '/', ['My_BigStyle','-','Smiley','-','About'] ] ; // Change the default plugin path. FCKConfig.PluginsPath = FCKConfig.BasePath.substr(0, FCKConfig.BasePath.length - 7) + '_samples/_plugins/' ; // Add our plugin to the plugins list. // FCKConfig.Plugins.Add( pluginName, availableLanguages ) // pluginName: The plugin name. The plugin directory must match this name. // availableLanguages: a list of available language files for the plugin (separated by a comma). FCKConfig.Plugins.Add( 'findreplace', 'en,fr,it' ) ; FCKConfig.Plugins.Add( 'samples' ) ; // If you want to use plugins found on other directories, just use the third parameter. var sOtherPluginPath = FCKConfig.BasePath.substr(0, FCKConfig.BasePath.length - 7) + 'editor/plugins/' ; FCKConfig.Plugins.Add( 'placeholder', 'de,en,es,fr,it,pl', sOtherPluginPath ) ; FCKConfig.Plugins.Add( 'tablecommands', null, sOtherPluginPath ) ; FCKConfig.Plugins.Add( 'simplecommands', null, sOtherPluginPath ) ;
10npsite
trunk/guanli/system/fckeditor/_samples/html/assets/sample06.config.js
JavaScript
asf20
2,199
<!-- * FCKeditor - The text editor for Internet - http://www.fckeditor.net * Copyright (C) 2003-2009 Frederico Caldeira Knabben * * == BEGIN LICENSE == * * Licensed under the terms of any of the following licenses at your * choice: * * - GNU General Public License Version 2 or later (the "GPL") * http://www.gnu.org/licenses/gpl.html * * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") * http://www.gnu.org/licenses/lgpl.html * * - Mozilla Public License Version 1.1 or later (the "MPL") * http://www.mozilla.org/MPL/MPL-1.1.html * * == END LICENSE == * * Sample page. --> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>FCKeditor - Sample</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <meta name="robots" content="noindex, nofollow" /> <link href="../sample.css" rel="stylesheet" type="text/css" /> <script type="text/javascript" src="../../../fckeditor.js"></script> </head> <body> <form action="../../php/sampleposteddata.php" method="post" target="_blank"> Normal text field:<br /> <input name="NormaText" value="Plain Text" /> <br /> <br /> FCKeditor 1: <script type="text/javascript"> <!-- // Automatically calculates the editor base path based on the _samples directory. // This is usefull only for these samples. A real application should use something like this: // oFCKeditor.BasePath = '/fckeditor/' ; // '/fckeditor/' is the default value. var sBasePath = document.location.href.substring(0,document.location.href.lastIndexOf('_samples')) ; var oFCKeditor = new FCKeditor( 'FCKeditor_1' ) ; oFCKeditor.BasePath = sBasePath ; oFCKeditor.Height = 100 ; oFCKeditor.Config[ 'ToolbarLocation' ] = 'Out:parent(xToolbar)' ; oFCKeditor.Value = '<p>This is some <strong>sample text<\/strong>. You are using <a href="http://www.fckeditor.net/">FCKeditor<\/a>.<\/p>' ; oFCKeditor.Create() ; //--> </script> <br /> FCKeditor 2: <script type="text/javascript"> <!-- oFCKeditor = new FCKeditor( 'FCKeditor_2' ) ; oFCKeditor.BasePath = sBasePath ; oFCKeditor.Height = 100 ; oFCKeditor.Config[ 'ToolbarLocation' ] = 'Out:parent(xToolbar)' ; oFCKeditor.Value = '<p>This is some <strong>sample text<\/strong>. You are using <a href="http://www.fckeditor.net/">FCKeditor<\/a>.<\/p>' ; oFCKeditor.Create() ; //--> </script> <br /> <input type="submit" value="Submit" /> </form> </body> </html>
10npsite
trunk/guanli/system/fckeditor/_samples/html/assets/sample11_frame.html
HTML
asf20
2,486
/* * FCKeditor - The text editor for Internet - http://www.fckeditor.net * Copyright (C) 2003-2009 Frederico Caldeira Knabben * * == BEGIN LICENSE == * * Licensed under the terms of any of the following licenses at your * choice: * * - GNU General Public License Version 2 or later (the "GPL") * http://www.gnu.org/licenses/gpl.html * * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") * http://www.gnu.org/licenses/lgpl.html * * - Mozilla Public License Version 1.1 or later (the "MPL") * http://www.mozilla.org/MPL/MPL-1.1.html * * == END LICENSE == * * Configuration settings used by the XHTML 1.1 sample page (sample14.html). */ // Our intention is force all formatting features to use CSS classes or // semantic aware elements. /** * Core styles. */ FCKConfig.CoreStyles.Bold = { Element : 'b' } ; FCKConfig.CoreStyles.Italic = { Element : 'i' } ; FCKConfig.CoreStyles.Underline = { Element : 'u' } ; FCKConfig.CoreStyles.StrikeThrough = { Element : 'strike' } ; /** * Font face */ // Define the way font elements will be applied to the document. The "span" // element will be used. When a font is selected, the font name defined in the // above list is passed to this definition with the name "Font", being it // injected in the "class" attribute. // We must also instruct the editor to replace span elements that are used to // set the font (Overrides). FCKConfig.CoreStyles.FontFace = { Element : 'font', Attributes : { 'face' : '#("Font")' } } ; /** * Font sizes. */ FCKConfig.FontSizes = '1/xx-small;2/x-small;3/small;4/medium;5/large;6/x-large;7/xx-large' ; FCKConfig.CoreStyles.Size = { Element : 'font', Attributes : { 'size' : '#("Size")' } } ; /** * Font colors. */ FCKConfig.EnableMoreFontColors = true ; FCKConfig.CoreStyles.Color = { Element : 'font', Attributes : { 'color' : '#("Color")' } } ; FCKConfig.CoreStyles.BackColor = { Element : 'font', Styles : { 'background-color' : '#("Color","color")' } } ; /** * Styles combo. */ FCKConfig.StylesXmlPath = '' ; FCKConfig.CustomStyles = { 'Computer Code' : { Element : 'code' }, 'Keyboard Phrase' : { Element : 'kbd' }, 'Sample Text' : { Element : 'samp' }, 'Variable' : { Element : 'var' }, 'Deleted Text' : { Element : 'del' }, 'Inserted Text' : { Element : 'ins' }, 'Cited Work' : { Element : 'cite' }, 'Inline Quotation' : { Element : 'q' } } ;
10npsite
trunk/guanli/system/fckeditor/_samples/html/assets/sample15.config.js
JavaScript
asf20
2,538
/* * FCKeditor - The text editor for Internet - http://www.fckeditor.net * Copyright (C) 2003-2009 Frederico Caldeira Knabben * * == BEGIN LICENSE == * * Licensed under the terms of any of the following licenses at your * choice: * * - GNU General Public License Version 2 or later (the "GPL") * http://www.gnu.org/licenses/gpl.html * * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") * http://www.gnu.org/licenses/lgpl.html * * - Mozilla Public License Version 1.1 or later (the "MPL") * http://www.mozilla.org/MPL/MPL-1.1.html * * == END LICENSE == * * Configuration settings used by the XHTML 1.1 sample page (sample14.html). */ // Our intention is force all formatting features to use CSS classes or // semantic aware elements. /** * Core styles. */ FCKConfig.CoreStyles.Bold = { Element : 'b' } ; FCKConfig.CoreStyles.Italic = { Element : 'i' } ; FCKConfig.CoreStyles.Underline = { Element : 'u' } ; /** * Font face */ // Define the way font elements will be applied to the document. The "span" // element will be used. When a font is selected, the font name defined in the // above list is passed to this definition with the name "Font", being it // injected in the "class" attribute. // We must also instruct the editor to replace span elements that are used to // set the font (Overrides). FCKConfig.CoreStyles.FontFace = { Element : 'font', Attributes : { 'face' : '#("Font")' } } ; /** * Font sizes. * The CSS part of the font sizes isn't used by Flash, it is there to get the * font rendered correctly in FCKeditor. */ FCKConfig.FontSizes = '8/8px;9/9px;10/10px;11/11px;12/12px;14/14px;16/16px;18/18px;20/20px;22/22px;24/24px;26/26px;28/28px;36/36px;48/48px;72/72px' ; FCKConfig.CoreStyles.Size = { Element : 'font', Attributes : { 'size' : '#("Size")' }, Styles : { 'font-size' : '#("Size","fontSize")' } } ; /** * Font colors. */ FCKConfig.EnableMoreFontColors = true ; FCKConfig.CoreStyles.Color = { Element : 'font', Attributes : { 'color' : '#("Color")' } } ; /** * Styles combo. */ FCKConfig.StylesXmlPath = '' ; FCKConfig.CustomStyles = { } ; /** * Toolbar set for Flash HTML editing. */ FCKConfig.ToolbarSets['Flash'] = [ ['Source','-','Bold','Italic','Underline','-','UnorderedList','-','Link','Unlink'], ['FontName','FontSize','-','About'] ] ; /** * Flash specific formatting settings. */ FCKConfig.EditorAreaStyles = 'p, ol, ul {margin-top: 0px; margin-bottom: 0px;}' ; FCKConfig.FormatSource = false ; FCKConfig.FormatOutput = false ;
10npsite
trunk/guanli/system/fckeditor/_samples/html/assets/sample16.config.js
JavaScript
asf20
2,665
/* * FCKeditor - The text editor for Internet - http://www.fckeditor.net * Copyright (C) 2003-2009 Frederico Caldeira Knabben * * == BEGIN LICENSE == * * Licensed under the terms of any of the following licenses at your * choice: * * - GNU General Public License Version 2 or later (the "GPL") * http://www.gnu.org/licenses/gpl.html * * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") * http://www.gnu.org/licenses/lgpl.html * * - Mozilla Public License Version 1.1 or later (the "MPL") * http://www.mozilla.org/MPL/MPL-1.1.html * * == END LICENSE == * * Configuration settings used by the XHTML 1.1 sample page (sample14.html). */ // Our intention is force all formatting features to use CSS classes or // semantic aware elements. // Load our custom CSS files for this sample. // We are using "BasePath" just for this sample convenience. In normal // situations it would be just pointed to the file directly, // like "/css/myfile.css". FCKConfig.EditorAreaCSS = FCKConfig.BasePath + '../_samples/html/assets/sample14.styles.css' ; /** * Core styles. */ FCKConfig.CoreStyles.Bold = { Element : 'span', Attributes : { 'class' : 'Bold' } } ; FCKConfig.CoreStyles.Italic = { Element : 'span', Attributes : { 'class' : 'Italic' } } ; FCKConfig.CoreStyles.Underline = { Element : 'span', Attributes : { 'class' : 'Underline' } } ; FCKConfig.CoreStyles.StrikeThrough = { Element : 'span', Attributes : { 'class' : 'StrikeThrough' } } ; /** * Font face */ // List of fonts available in the toolbar combo. Each font definition is // separated by a semi-colon (;). We are using class names here, so each font // is defined by {Class Name}/{Combo Label}. FCKConfig.FontNames = 'FontComic/Comic Sans MS;FontCourier/Courier New;FontTimes/Times New Roman' ; // Define the way font elements will be applied to the document. The "span" // element will be used. When a font is selected, the font name defined in the // above list is passed to this definition with the name "Font", being it // injected in the "class" attribute. // We must also instruct the editor to replace span elements that are used to // set the font (Overrides). FCKConfig.CoreStyles.FontFace = { Element : 'span', Attributes : { 'class' : '#("Font")' }, Overrides : [ { Element : 'span', Attributes : { 'class' : /^Font(?:Comic|Courier|Times)$/ } } ] } ; /** * Font sizes. */ FCKConfig.FontSizes = 'FontSmaller/Smaller;FontLarger/Larger;FontSmall/8pt;FontBig/14pt;FontDouble/Double Size' ; FCKConfig.CoreStyles.Size = { Element : 'span', Attributes : { 'class' : '#("Size")' }, Overrides : [ { Element : 'span', Attributes : { 'class' : /^Font(?:Smaller|Larger|Small|Big|Double)$/ } } ] } ; /** * Font colors. */ FCKConfig.EnableMoreFontColors = false ; FCKConfig.FontColors = 'ff9900/FontColor1,0066cc/FontColor2,ff0000/FontColor3' ; FCKConfig.CoreStyles.Color = { Element : 'span', Attributes : { 'class' : '#("Color")' }, Overrides : [ { Element : 'span', Attributes : { 'class' : /^FontColor(?:1|2|3)$/ } } ] } ; FCKConfig.CoreStyles.BackColor = { Element : 'span', Attributes : { 'class' : '#("Color")BG' }, Overrides : [ { Element : 'span', Attributes : { 'class' : /^FontColor(?:1|2|3)BG$/ } } ] } ; /** * Indentation. */ FCKConfig.IndentClasses = [ 'Indent1', 'Indent2', 'Indent3' ] ; /** * Paragraph justification. */ FCKConfig.JustifyClasses = [ 'JustifyLeft', 'JustifyCenter', 'JustifyRight', 'JustifyFull' ] ; /** * Styles combo. */ FCKConfig.StylesXmlPath = '' ; FCKConfig.CustomStyles = { 'Strong Emphasis' : { Element : 'strong' }, 'Emphasis' : { Element : 'em' }, 'Computer Code' : { Element : 'code' }, 'Keyboard Phrase' : { Element : 'kbd' }, 'Sample Text' : { Element : 'samp' }, 'Variable' : { Element : 'var' }, 'Deleted Text' : { Element : 'del' }, 'Inserted Text' : { Element : 'ins' }, 'Cited Work' : { Element : 'cite' }, 'Inline Quotation' : { Element : 'q' } } ;
10npsite
trunk/guanli/system/fckeditor/_samples/html/assets/sample14.config.js
JavaScript
asf20
4,118
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <!-- * FCKeditor - The text editor for Internet - http://www.fckeditor.net * Copyright (C) 2003-2009 Frederico Caldeira Knabben * * == BEGIN LICENSE == * * Licensed under the terms of any of the following licenses at your * choice: * * - GNU General Public License Version 2 or later (the "GPL") * http://www.gnu.org/licenses/gpl.html * * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") * http://www.gnu.org/licenses/lgpl.html * * - Mozilla Public License Version 1.1 or later (the "MPL") * http://www.mozilla.org/MPL/MPL-1.1.html * * == END LICENSE == * * Sample page. --> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>FCKeditor - Sample</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <meta name="robots" content="noindex, nofollow" /> <link href="../sample.css" rel="stylesheet" type="text/css" /> <script type="text/javascript" src="../../fckeditor.js"></script> <script type="text/javascript"> function FCKeditor_OnComplete( editorInstance ) { var oCombo = document.getElementById( 'cmbToolbars' ) ; oCombo.value = editorInstance.ToolbarSet.Name ; oCombo.style.visibility = '' ; } function ChangeLanguage( languageCode ) { document.location.href = document.location.href.replace( /\?.*$/, '' ) + "?" + languageCode ; } </script> </head> <body> <h1> FCKeditor - JavaScript - Sample 4</h1> <div> This sample shows how to change the editor toolbar. </div> <hr /> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td> Select the toolbar to load:&nbsp; </td> <td> <select id="cmbToolbars" onchange="ChangeLanguage(this.value);" style="visibility: hidden"> <option value="Default" selected="selected">Default</option> <option value="Basic">Basic</option> </select> </td> </tr> </table> <br /> <form action="../php/sampleposteddata.php" method="post" target="_blank"> <script type="text/javascript"> <!-- // Automatically calculates the editor base path based on the _samples directory. // This is usefull only for these samples. A real application should use something like this: // oFCKeditor.BasePath = '/fckeditor/' ; // '/fckeditor/' is the default value. var sBasePath = document.location.href.substring(0,document.location.href.lastIndexOf('_samples')) ; // Get the toolbar from the URL. var sToolbar ; if ( document.location.search.length > 1 ) sToolbar = document.location.search.substr(1) ; var oFCKeditor = new FCKeditor( 'FCKeditor1' ) ; oFCKeditor.BasePath = sBasePath ; if ( sToolbar != null ) oFCKeditor.ToolbarSet = sToolbar ; oFCKeditor.Value = '<p>This is some <strong>sample text<\/strong>. You are using <a href="http://www.fckeditor.net/">FCKeditor<\/a>.<\/p>' ; oFCKeditor.Create() ; //--> </script> <br /> <input type="submit" value="Submit" /> </form> </body> </html>
10npsite
trunk/guanli/system/fckeditor/_samples/html/sample04.html
HTML
asf20
3,089
/* * FCKeditor - The text editor for Internet - http://www.fckeditor.net * Copyright (C) 2003-2009 Frederico Caldeira Knabben * * == BEGIN LICENSE == * * Licensed under the terms of any of the following licenses at your * choice: * * - GNU General Public License Version 2 or later (the "GPL") * http://www.gnu.org/licenses/gpl.html * * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") * http://www.gnu.org/licenses/lgpl.html * * - Mozilla Public License Version 1.1 or later (the "MPL") * http://www.mozilla.org/MPL/MPL-1.1.html * * == END LICENSE == * * This is the sample plugin definition file. */ // Register the related commands. FCKCommands.RegisterCommand( 'My_Find' , new FCKDialogCommand( FCKLang['DlgMyFindTitle'] , FCKLang['DlgMyFindTitle'] , FCKConfig.PluginsPath + 'findreplace/find.html' , 340, 170 ) ) ; FCKCommands.RegisterCommand( 'My_Replace' , new FCKDialogCommand( FCKLang['DlgMyReplaceTitle'], FCKLang['DlgMyReplaceTitle'] , FCKConfig.PluginsPath + 'findreplace/replace.html', 340, 200 ) ) ; // Create the "Find" toolbar button. var oFindItem = new FCKToolbarButton( 'My_Find', FCKLang['DlgMyFindTitle'] ) ; oFindItem.IconPath = FCKConfig.PluginsPath + 'findreplace/find.gif' ; FCKToolbarItems.RegisterItem( 'My_Find', oFindItem ) ; // 'My_Find' is the name used in the Toolbar config. // Create the "Replace" toolbar button. var oReplaceItem = new FCKToolbarButton( 'My_Replace', FCKLang['DlgMyReplaceTitle'] ) ; oReplaceItem.IconPath = FCKConfig.PluginsPath + 'findreplace/replace.gif' ; FCKToolbarItems.RegisterItem( 'My_Replace', oReplaceItem ) ; // 'My_Replace' is the name used in the Toolbar config.
10npsite
trunk/guanli/system/fckeditor/_samples/_plugins/findreplace/fckplugin.js
JavaScript
asf20
1,735
/* * FCKeditor - The text editor for Internet - http://www.fckeditor.net * Copyright (C) 2003-2009 Frederico Caldeira Knabben * * == BEGIN LICENSE == * * Licensed under the terms of any of the following licenses at your * choice: * * - GNU General Public License Version 2 or later (the "GPL") * http://www.gnu.org/licenses/gpl.html * * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") * http://www.gnu.org/licenses/lgpl.html * * - Mozilla Public License Version 1.1 or later (the "MPL") * http://www.mozilla.org/MPL/MPL-1.1.html * * == END LICENSE == * * Italian language file for the sample plugin. */ FCKLang['DlgMyReplaceTitle'] = 'Plugin - Sostituisci' ; FCKLang['DlgMyReplaceFindLbl'] = 'Trova:' ; FCKLang['DlgMyReplaceReplaceLbl'] = 'Sostituisci con:' ; FCKLang['DlgMyReplaceCaseChk'] = 'Maiuscole/minuscole' ; FCKLang['DlgMyReplaceReplaceBtn'] = 'Sostituisci' ; FCKLang['DlgMyReplaceReplAllBtn'] = 'Sostituisci tutto' ; FCKLang['DlgMyReplaceWordChk'] = 'Parola intera' ; FCKLang['DlgMyFindTitle'] = 'Plugin - Cerca' ; FCKLang['DlgMyFindFindBtn'] = 'Cerca' ;
10npsite
trunk/guanli/system/fckeditor/_samples/_plugins/findreplace/lang/it.js
JavaScript
asf20
1,166
/* * FCKeditor - The text editor for Internet - http://www.fckeditor.net * Copyright (C) 2003-2009 Frederico Caldeira Knabben * * == BEGIN LICENSE == * * Licensed under the terms of any of the following licenses at your * choice: * * - GNU General Public License Version 2 or later (the "GPL") * http://www.gnu.org/licenses/gpl.html * * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") * http://www.gnu.org/licenses/lgpl.html * * - Mozilla Public License Version 1.1 or later (the "MPL") * http://www.mozilla.org/MPL/MPL-1.1.html * * == END LICENSE == * * French language file for the sample plugin. */ FCKLang['DlgMyReplaceTitle'] = 'Plugin - Remplacer' ; FCKLang['DlgMyReplaceFindLbl'] = 'Chercher:' ; FCKLang['DlgMyReplaceReplaceLbl'] = 'Remplacer par:' ; FCKLang['DlgMyReplaceCaseChk'] = 'Respecter la casse' ; FCKLang['DlgMyReplaceReplaceBtn'] = 'Remplacer' ; FCKLang['DlgMyReplaceReplAllBtn'] = 'Remplacer Tout' ; FCKLang['DlgMyReplaceWordChk'] = 'Mot entier' ; FCKLang['DlgMyFindTitle'] = 'Plugin - Chercher' ; FCKLang['DlgMyFindFindBtn'] = 'Chercher' ;
10npsite
trunk/guanli/system/fckeditor/_samples/_plugins/findreplace/lang/fr.js
JavaScript
asf20
1,161
/* * FCKeditor - The text editor for Internet - http://www.fckeditor.net * Copyright (C) 2003-2009 Frederico Caldeira Knabben * * == BEGIN LICENSE == * * Licensed under the terms of any of the following licenses at your * choice: * * - GNU General Public License Version 2 or later (the "GPL") * http://www.gnu.org/licenses/gpl.html * * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") * http://www.gnu.org/licenses/lgpl.html * * - Mozilla Public License Version 1.1 or later (the "MPL") * http://www.mozilla.org/MPL/MPL-1.1.html * * == END LICENSE == * * English language file for the sample plugin. */ FCKLang['DlgMyReplaceTitle'] = 'Plugin - Replace' ; FCKLang['DlgMyReplaceFindLbl'] = 'Find what:' ; FCKLang['DlgMyReplaceReplaceLbl'] = 'Replace with:' ; FCKLang['DlgMyReplaceCaseChk'] = 'Match case' ; FCKLang['DlgMyReplaceReplaceBtn'] = 'Replace' ; FCKLang['DlgMyReplaceReplAllBtn'] = 'Replace All' ; FCKLang['DlgMyReplaceWordChk'] = 'Match whole word' ; FCKLang['DlgMyFindTitle'] = 'Plugin - Find' ; FCKLang['DlgMyFindFindBtn'] = 'Find' ;
10npsite
trunk/guanli/system/fckeditor/_samples/_plugins/findreplace/lang/en.js
JavaScript
asf20
1,145
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <!-- * FCKeditor - The text editor for Internet - http://www.fckeditor.net * Copyright (C) 2003-2009 Frederico Caldeira Knabben * * == BEGIN LICENSE == * * Licensed under the terms of any of the following licenses at your * choice: * * - GNU General Public License Version 2 or later (the "GPL") * http://www.gnu.org/licenses/gpl.html * * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") * http://www.gnu.org/licenses/lgpl.html * * - Mozilla Public License Version 1.1 or later (the "MPL") * http://www.mozilla.org/MPL/MPL-1.1.html * * == END LICENSE == * * This is the sample "Find" plugin window. --> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <meta content="noindex, nofollow" name="robots"> <script type="text/javascript"> var oEditor = window.parent.InnerDialogLoaded() ; function OnLoad() { // Whole word is available on IE only. if ( oEditor.FCKBrowserInfo.IsIE ) document.getElementById('divWord').style.display = '' ; // First of all, translate the dialog box texts. oEditor.FCKLanguageManager.TranslatePage( document ) ; window.parent.SetAutoSize( true ) ; } function btnStat(frm) { document.getElementById('btnFind').disabled = ( document.getElementById('txtFind').value.length == 0 ) ; } function ReplaceTextNodes( parentNode, regex, replaceValue, replaceAll ) { for ( var i = 0 ; i < parentNode.childNodes.length ; i++ ) { var oNode = parentNode.childNodes[i] ; if ( oNode.nodeType == 3 ) { var sReplaced = oNode.nodeValue.replace( regex, replaceValue ) ; if ( oNode.nodeValue != sReplaced ) { oNode.nodeValue = sReplaced ; if ( ! replaceAll ) return true ; } } else { if ( ReplaceTextNodes( oNode, regex, replaceValue ) ) return true ; } } return false ; } function GetRegexExpr() { if ( document.getElementById('chkWord').checked ) var sExpr = '\\b' + document.getElementById('txtFind').value + '\\b' ; else var sExpr = document.getElementById('txtFind').value ; return sExpr ; } function GetCase() { return ( document.getElementById('chkCase').checked ? '' : 'i' ) ; } function Ok() { if ( document.getElementById('txtFind').value.length == 0 ) return ; if ( oEditor.FCKBrowserInfo.IsIE ) FindIE() ; else FindGecko() ; } var oRange = null ; function FindIE() { if ( oRange == null ) oRange = oEditor.FCK.EditorDocument.body.createTextRange() ; var iFlags = 0 ; if ( chkCase.checked ) iFlags = iFlags | 4 ; if ( chkWord.checked ) iFlags = iFlags | 2 ; var bFound = oRange.findText( document.getElementById('txtFind').value, 1, iFlags ) ; if ( bFound ) { oRange.scrollIntoView() ; oRange.select() ; oRange.collapse(false) ; oLastRangeFound = oRange ; } else { oRange = null ; alert( oEditor.FCKLang.DlgFindNotFoundMsg ) ; } } function FindGecko() { var bCase = document.getElementById('chkCase').checked ; var bWord = document.getElementById('chkWord').checked ; // window.find( searchString, caseSensitive, backwards, wrapAround, wholeWord, searchInFrames, showDialog ) ; oEditor.FCK.EditorWindow.find( document.getElementById('txtFind').value, bCase, false, false, bWord, false, false ) ; } </script> </head> <body onload="OnLoad()" scroll="no" style="OVERFLOW: hidden"> <div align="center"> This is my Plugin! </div> <table cellSpacing="3" cellPadding="2" width="100%" border="0"> <tr> <td nowrap> <label for="txtFind" fckLang="DlgMyReplaceFindLbl">Find what:</label>&nbsp; </td> <td width="100%"> <input id="txtFind" onkeyup="btnStat(this.form)" style="WIDTH: 100%" tabIndex="1" type="text"> </td> <td> <input id="btnFind" style="WIDTH: 100%; PADDING-RIGHT: 5px; PADDING-LEFT: 5px" disabled onclick="Ok();" type="button" value="Find" fckLang="DlgMyFindFindBtn"> </td> </tr> <tr> <td valign="bottom" colSpan="3"> &nbsp;<input id="chkCase" tabIndex="3" type="checkbox"><label for="chkCase" fckLang="DlgMyReplaceCaseChk">Match case</label> <br> <div id="divWord" style="DISPLAY: none"> &nbsp;<input id="chkWord" tabIndex="4" type="checkbox"><label for="chkWord" fckLang="DlgMyReplaceWordChk">Match whole word</label> </div> </td> </tr> </table> </body> </html>
10npsite
trunk/guanli/system/fckeditor/_samples/_plugins/findreplace/find.html
HTML
asf20
4,561
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <!-- * FCKeditor - The text editor for Internet - http://www.fckeditor.net * Copyright (C) 2003-2009 Frederico Caldeira Knabben * * == BEGIN LICENSE == * * Licensed under the terms of any of the following licenses at your * choice: * * - GNU General Public License Version 2 or later (the "GPL") * http://www.gnu.org/licenses/gpl.html * * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") * http://www.gnu.org/licenses/lgpl.html * * - Mozilla Public License Version 1.1 or later (the "MPL") * http://www.mozilla.org/MPL/MPL-1.1.html * * == END LICENSE == * * This is the sample "Replace" plugin window. --> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <meta content="noindex, nofollow" name="robots"> <script type="text/javascript"> var oEditor = window.parent.InnerDialogLoaded() ; function OnLoad() { // First of all, translate the dialog box texts oEditor.FCKLanguageManager.TranslatePage( document ) ; window.parent.SetAutoSize( true ) ; } function btnStat(frm) { document.getElementById('btnReplace').disabled = document.getElementById('btnReplaceAll').disabled = ( document.getElementById('txtFind').value.length == 0 ) ; } function ReplaceTextNodes( parentNode, regex, replaceValue, replaceAll, hasFound ) { for ( var i = 0 ; i < parentNode.childNodes.length ; i++ ) { var oNode = parentNode.childNodes[i] ; if ( oNode.nodeType == 3 ) { var sReplaced = oNode.nodeValue.replace( regex, replaceValue ) ; if ( oNode.nodeValue != sReplaced ) { oNode.nodeValue = sReplaced ; if ( ! replaceAll ) return true ; hasFound = true ; } } hasFound = ReplaceTextNodes( oNode, regex, replaceValue, replaceAll, hasFound ) ; if ( ! replaceAll && hasFound ) return true ; } return hasFound ; } function GetRegexExpr() { if ( document.getElementById('chkWord').checked ) var sExpr = '\\b' + document.getElementById('txtFind').value + '\\b' ; else var sExpr = document.getElementById('txtFind').value ; return sExpr ; } function GetCase() { return ( document.getElementById('chkCase').checked ? '' : 'i' ) ; } function Replace() { var oRegex = new RegExp( GetRegexExpr(), GetCase() ) ; ReplaceTextNodes( oEditor.FCK.EditorDocument.body, oRegex, document.getElementById('txtReplace').value, false ) ; } function ReplaceAll() { var oRegex = new RegExp( GetRegexExpr(), GetCase() + 'g' ) ; ReplaceTextNodes( oEditor.FCK.EditorDocument.body, oRegex, document.getElementById('txtReplace').value, true ) ; window.parent.Cancel() ; } </script> </head> <body onload="OnLoad()" scroll="no" style="OVERFLOW: hidden"> <div align="center"> This is my Plugin! </div> <table cellSpacing="3" cellPadding="2" width="100%" border="0"> <tr> <td noWrap><label for="txtFind" fckLang="DlgMyReplaceFindLbl">Find what:</label> </td> <td width="100%"><input id="txtFind" onkeyup="btnStat(this.form)" style="WIDTH: 100%" tabIndex="1" type="text"> </td> <td><input id="btnReplace" style="WIDTH: 100%" disabled onclick="Replace();" type="button" value="Replace" fckLang="DlgMyReplaceReplaceBtn"> </td> </tr> <tr> <td vAlign="top" nowrap><label for="txtReplace" fckLang="DlgMyReplaceReplaceLbl">Replace with:</label> </td> <td vAlign="top"><input id="txtReplace" style="WIDTH: 100%" tabIndex="2" type="text"> </td> <td><input id="btnReplaceAll" disabled onclick="ReplaceAll()" type="button" value="Replace All" fckLang="DlgMyReplaceReplAllBtn"> </td> </tr> <tr> <td vAlign="bottom" colSpan="3">&nbsp;<input id="chkCase" tabIndex="3" type="checkbox"><label for="chkCase" fckLang="DlgMyReplaceCaseChk">Match case</label> <br> &nbsp;<input id="chkWord" tabIndex="4" type="checkbox"><label for="chkWord" fckLang="DlgMyReplaceWordChk">Match whole word</label> </td> </tr> </table> </body> </html>
10npsite
trunk/guanli/system/fckeditor/_samples/_plugins/findreplace/replace.html
HTML
asf20
4,157
/* * FCKeditor - The text editor for Internet - http://www.fckeditor.net * Copyright (C) 2003-2009 Frederico Caldeira Knabben * * == BEGIN LICENSE == * * Licensed under the terms of any of the following licenses at your * choice: * * - GNU General Public License Version 2 or later (the "GPL") * http://www.gnu.org/licenses/gpl.html * * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") * http://www.gnu.org/licenses/lgpl.html * * - Mozilla Public License Version 1.1 or later (the "MPL") * http://www.mozilla.org/MPL/MPL-1.1.html * * == END LICENSE == * * This is a sample plugin definition file. */ // Here we define our custom Style combo, with custom widths. var oMyBigStyleCombo = new FCKToolbarStyleCombo() ; oMyBigStyleCombo.FieldWidth = 250 ; oMyBigStyleCombo.PanelWidth = 300 ; FCKToolbarItems.RegisterItem( 'My_BigStyle', oMyBigStyleCombo ) ; // ##### Defining a custom context menu entry. // ## 1. Define the command to be executed when selecting the context menu item. var oMyCMCommand = new Object() ; oMyCMCommand.Name = 'OpenImage' ; // This is the standard function used to execute the command (called when clicking in the context menu item). oMyCMCommand.Execute = function() { // This command is called only when an image element is selected (IMG). // Get image URL (src). var sUrl = FCKSelection.GetSelectedElement().src ; // Open the URL in a new window. window.top.open( sUrl ) ; } // This is the standard function used to retrieve the command state (it could be disabled for some reason). oMyCMCommand.GetState = function() { // Let's make it always enabled. return FCK_TRISTATE_OFF ; } // ## 2. Register our custom command. FCKCommands.RegisterCommand( 'OpenImage', oMyCMCommand ) ; // ## 3. Define the context menu "listener". var oMyContextMenuListener = new Object() ; // This is the standard function called right before sowing the context menu. oMyContextMenuListener.AddItems = function( contextMenu, tag, tagName ) { // Let's show our custom option only for images. if ( tagName == 'IMG' ) { contextMenu.AddSeparator() ; contextMenu.AddItem( 'OpenImage', 'Open image in a new window (Custom)' ) ; } } // ## 4. Register our context menu listener. FCK.ContextMenu.RegisterListener( oMyContextMenuListener ) ;
10npsite
trunk/guanli/system/fckeditor/_samples/_plugins/samples/fckplugin.js
JavaScript
asf20
2,392
<%@ CodePage=65001 Language="VBScript"%> <% Option Explicit %> <!-- * FCKeditor - The text editor for Internet - http://www.fckeditor.net * Copyright (C) 2003-2009 Frederico Caldeira Knabben * * == BEGIN LICENSE == * * Licensed under the terms of any of the following licenses at your * choice: * * - GNU General Public License Version 2 or later (the "GPL") * http://www.gnu.org/licenses/gpl.html * * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") * http://www.gnu.org/licenses/lgpl.html * * - Mozilla Public License Version 1.1 or later (the "MPL") * http://www.mozilla.org/MPL/MPL-1.1.html * * == END LICENSE == * * Sample page. --> <% ' You must set "Enable Parent Paths" on your web site in order this relative include to work. %> <!-- #INCLUDE file="../../fckeditor.asp" --> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html> <head> <title>FCKeditor - Sample</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <meta name="robots" content="noindex, nofollow"> <link href="../sample.css" rel="stylesheet" type="text/css" /> <script type="text/javascript"> function FCKeditor_OnComplete( editorInstance ) { var oCombo = document.getElementById( 'cmbLanguages' ) ; for ( code in editorInstance.Language.AvailableLanguages ) { AddComboOption( oCombo, editorInstance.Language.AvailableLanguages[code] + ' (' + code + ')', code ) ; } oCombo.value = editorInstance.Language.ActiveLanguage.Code ; } function AddComboOption(combo, optionText, optionValue) { var oOption = document.createElement("OPTION") ; combo.options.add(oOption) ; oOption.innerHTML = optionText ; oOption.value = optionValue ; return oOption ; } function ChangeLanguage( languageCode ) { window.location.href = window.location.pathname + "?Lang=" + languageCode ; } </script> </head> <body> <h1>FCKeditor - ASP - Sample 2</h1> This sample shows the editor in all its available languages. <hr> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td> Select a language:&nbsp; </td> <td> <select id="cmbLanguages" onchange="ChangeLanguage(this.value);"> </select> </td> </tr> </table> <br> <form action="sampleposteddata.asp" method="post" target="_blank"> <% ' Automatically calculates the editor base path based on the _samples directory. ' This is usefull only for these samples. A real application should use something like this: ' oFCKeditor.BasePath = '/fckeditor/' ; // '/fckeditor/' is the default value. Dim sBasePath sBasePath = Request.ServerVariables("PATH_INFO") sBasePath = Left( sBasePath, InStrRev( sBasePath, "/_samples" ) ) 'This RegExp is used to sanitize recived lang parameter Dim oRegex Set oRegex = New RegExp oRegex.Global = True oRegex.Pattern = "[^a-z\-]" Dim oFCKeditor Set oFCKeditor = New FCKeditor oFCKeditor.BasePath = sBasePath If Request.QueryString("Lang") = "" Then oFCKeditor.Config("AutoDetectLanguage") = True oFCKeditor.Config("DefaultLanguage") = "en" Else oFCKeditor.Config("AutoDetectLanguage") = False oFCKeditor.Config("DefaultLanguage") = oRegex.Replace( Request.QueryString("Lang"), "") End If oFCKeditor.Value = "<p>This is some <strong>sample text</strong>. You are using <a href=""http://www.fckeditor.net/"">FCKeditor</a>." oFCKeditor.Create "FCKeditor1" %> <br> <input type="submit" value="Submit"> </form> </body> </html>
10npsite
trunk/guanli/system/fckeditor/_samples/asp/sample02.asp
Classic ASP
asf20
3,574
<%@ CodePage=65001 Language="VBScript"%> <% Option Explicit %> <!-- * FCKeditor - The text editor for Internet - http://www.fckeditor.net * Copyright (C) 2003-2009 Frederico Caldeira Knabben * * == BEGIN LICENSE == * * Licensed under the terms of any of the following licenses at your * choice: * * - GNU General Public License Version 2 or later (the "GPL") * http://www.gnu.org/licenses/gpl.html * * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") * http://www.gnu.org/licenses/lgpl.html * * - Mozilla Public License Version 1.1 or later (the "MPL") * http://www.mozilla.org/MPL/MPL-1.1.html * * == END LICENSE == * * Sample page. --> <% ' You must set "Enable Parent Paths" on your web site in order this relative include to work. %> <!-- #INCLUDE file="../../fckeditor.asp" --> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html> <head> <title>FCKeditor - Sample</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <meta name="robots" content="noindex, nofollow"> <link href="../sample.css" rel="stylesheet" type="text/css" /> <script type="text/javascript"> function FCKeditor_OnComplete( editorInstance ) { var oCombo = document.getElementById( 'cmbToolbars' ) ; oCombo.value = editorInstance.ToolbarSet.Name ; oCombo.style.visibility = '' ; } function ChangeToolbar( toolbarName ) { window.location.href = window.location.pathname + "?Toolbar=" + toolbarName ; } </script> </head> <body> <h1>FCKeditor - ASP - Sample 3</h1> This sample shows how to change the editor toolbar. <hr> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td> Select the toolbar to load:&nbsp; </td> <td> <select id="cmbToolbars" onchange="ChangeToolbar(this.value);" style="VISIBILITY: hidden"> <option value="Default" selected>Default</option> <option value="Basic">Basic</option> </select> </td> </tr> </table> <br> <form action="sampleposteddata.asp" method="post" target="_blank"> <% ' Automatically calculates the editor base path based on the _samples directory. ' This is usefull only for these samples. A real application should use something like this: ' oFCKeditor.BasePath = '/fckeditor/' ; // '/fckeditor/' is the default value. Dim sBasePath sBasePath = Request.ServerVariables("PATH_INFO") sBasePath = Left( sBasePath, InStrRev( sBasePath, "/_samples" ) ) 'This RegExp is used to sanitize recived toolbar parameter Dim oRegex Set oRegex = New RegExp oRegex.Global = True oRegex.Pattern = "[^a-zA-Z]" Dim oFCKeditor Set oFCKeditor = New FCKeditor oFCKeditor.BasePath = sBasePath If Request.QueryString("Toolbar") <> "" Then oFCKeditor.ToolbarSet = oRegex.Replace( Request.QueryString("Toolbar"), "" ) End If oFCKeditor.Value = "<p>This is some <strong>sample text</strong>. You are using <a href=""http://www.fckeditor.net/"">FCKeditor</a>." oFCKeditor.Create "FCKeditor1" %> <br> <input type="submit" value="Submit"> </form> </body> </html>
10npsite
trunk/guanli/system/fckeditor/_samples/asp/sample03.asp
Classic ASP
asf20
3,142
<%@ CodePage=65001 Language="VBScript"%> <% Option Explicit %> <!-- * FCKeditor - The text editor for Internet - http://www.fckeditor.net * Copyright (C) 2003-2009 Frederico Caldeira Knabben * * == BEGIN LICENSE == * * Licensed under the terms of any of the following licenses at your * choice: * * - GNU General Public License Version 2 or later (the "GPL") * http://www.gnu.org/licenses/gpl.html * * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") * http://www.gnu.org/licenses/lgpl.html * * - Mozilla Public License Version 1.1 or later (the "MPL") * http://www.mozilla.org/MPL/MPL-1.1.html * * == END LICENSE == * * This page lists the data posted by a form. --> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html> <head> <title>FCKeditor - Samples - Posted Data</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <meta name="robots" content="noindex, nofollow"> <link href="../sample.css" rel="stylesheet" type="text/css" > </head> <body> <h1>FCKeditor - Samples - Posted Data</h1> This page lists all data posted by the form. <hr> <table border="1" cellspacing="0" id="outputSample"> <colgroup><col width="80"><col></colgroup> <thead> <tr> <th>Field Name</th> <th>Value</th> </tr> </thead> <% Dim sForm For Each sForm in Request.Form %> <tr> <th><%=Server.HTMLEncode( sForm )%></th> <td><pre><%=Server.HTMLEncode( Request.Form(sForm) )%></pre></td> </tr> <% Next %> </table> </body> </html>
10npsite
trunk/guanli/system/fckeditor/_samples/asp/sampleposteddata.asp
Classic ASP
asf20
1,631
<%@ codepage="65001" language="VBScript" %> <% Option Explicit %> <!-- * FCKeditor - The text editor for Internet - http://www.fckeditor.net * Copyright (C) 2003-2009 Frederico Caldeira Knabben * * == BEGIN LICENSE == * * Licensed under the terms of any of the following licenses at your * choice: * * - GNU General Public License Version 2 or later (the "GPL") * http://www.gnu.org/licenses/gpl.html * * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") * http://www.gnu.org/licenses/lgpl.html * * - Mozilla Public License Version 1.1 or later (the "MPL") * http://www.mozilla.org/MPL/MPL-1.1.html * * == END LICENSE == * * Sample page. --> <% ' You must set "Enable Parent Paths" on your web site in order this relative include to work. %> <!-- #INCLUDE file="../../fckeditor.asp" --> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>FCKeditor - Sample</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <meta name="robots" content="noindex, nofollow" /> <link href="../sample.css" rel="stylesheet" type="text/css" /> </head> <body> <h1> FCKeditor - ASP - Sample 1 </h1> <div> This sample displays a normal HTML form with an FCKeditor with full features enabled. </div> <hr /> <form action="sampleposteddata.asp" method="post" target="_blank"> <% ' Automatically calculates the editor base path based on the _samples directory. ' This is usefull only for these samples. A real application should use something like this: ' oFCKeditor.BasePath = '/fckeditor/' ; // '/fckeditor/' is the default value. Dim sBasePath sBasePath = Request.ServerVariables("PATH_INFO") sBasePath = Left( sBasePath, InStrRev( sBasePath, "/_samples" ) ) Dim oFCKeditor Set oFCKeditor = New FCKeditor oFCKeditor.BasePath = sBasePath oFCKeditor.Value = "<p>This is some <strong>sample text</strong>. You are using <a href=""http://www.fckeditor.net/"">FCKeditor</a>." oFCKeditor.Create "FCKeditor1" %> <br /> <input type="submit" value="Submit" /> </form> </body> </html>
10npsite
trunk/guanli/system/fckeditor/_samples/asp/sample01.asp
Classic ASP
asf20
2,247
<%@ CodePage=65001 Language="VBScript"%> <% Option Explicit %> <!-- * FCKeditor - The text editor for Internet - http://www.fckeditor.net * Copyright (C) 2003-2009 Frederico Caldeira Knabben * * == BEGIN LICENSE == * * Licensed under the terms of any of the following licenses at your * choice: * * - GNU General Public License Version 2 or later (the "GPL") * http://www.gnu.org/licenses/gpl.html * * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") * http://www.gnu.org/licenses/lgpl.html * * - Mozilla Public License Version 1.1 or later (the "MPL") * http://www.mozilla.org/MPL/MPL-1.1.html * * == END LICENSE == * * Sample page. --> <% ' You must set "Enable Parent Paths" on your web site in order this relative include to work. %> <!-- #INCLUDE file="../../fckeditor.asp" --> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html> <head> <title>FCKeditor - Sample</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <meta name="robots" content="noindex, nofollow"> <link href="../sample.css" rel="stylesheet" type="text/css" /> <script type="text/javascript"> function FCKeditor_OnComplete( editorInstance ) { var oCombo = document.getElementById( 'cmbSkins' ) ; // Get the active skin. var sSkin = editorInstance.Config['SkinPath'] ; sSkin = sSkin.match( /[^\/]+(?=\/$)/g ) ; oCombo.value = sSkin ; oCombo.style.visibility = '' ; } function ChangeSkin( skinName ) { window.location.href = window.location.pathname + "?Skin=" + skinName ; } </script> </head> <body> <h1>FCKeditor - ASP - Sample 4</h1> This sample shows how to change the editor skin. <hr> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td> Select the skin to load:&nbsp; </td> <td> <select id="cmbSkins" onchange="ChangeSkin(this.value);" style="VISIBILITY: hidden"> <option value="default" selected>Default</option> <option value="office2003">Office 2003</option> <option value="silver">Silver</option> </select> </td> </tr> </table> <br> <form action="sampleposteddata.asp" method="post" target="_blank"> <% ' Automatically calculates the editor base path based on the _samples directory. ' This is usefull only for these samples. A real application should use something like this: ' oFCKeditor.BasePath = '/fckeditor/' ; // '/fckeditor/' is the default value. Dim sBasePath sBasePath = Request.ServerVariables("PATH_INFO") sBasePath = Left( sBasePath, InStrRev( sBasePath, "/_samples" ) ) 'This RegExp is used to sanitize recived skin parameter Dim oRegex Set oRegex = New RegExp oRegex.Global = True oRegex.Pattern = "[^a-zA-Z0-9]" Dim oFCKeditor Set oFCKeditor = New FCKeditor oFCKeditor.BasePath = sBasePath If Request.QueryString("Skin") <> "" Then oFCKeditor.Config("SkinPath") = sBasePath + "editor/skins/" & oRegex.Replace( Request.QueryString("Skin"), "" ) + "/" End If oFCKeditor.Value = "<p>This is some <strong>sample text</strong>. You are using <a href=""http://www.fckeditor.net/"">FCKeditor</a>." oFCKeditor.Create "FCKeditor1" %> <br> <input type="submit" value="Submit"> </form> </body> </html>
10npsite
trunk/guanli/system/fckeditor/_samples/asp/sample04.asp
Classic ASP
asf20
3,309
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <!-- * FCKeditor - The text editor for Internet - http://www.fckeditor.net * Copyright (C) 2003-2009 Frederico Caldeira Knabben * * == BEGIN LICENSE == * * Licensed under the terms of any of the following licenses at your * choice: * * - GNU General Public License Version 2 or later (the "GPL") * http://www.gnu.org/licenses/gpl.html * * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") * http://www.gnu.org/licenses/lgpl.html * * - Mozilla Public License Version 1.1 or later (the "MPL") * http://www.mozilla.org/MPL/MPL-1.1.html * * == END LICENSE == * * Sample Adobe AIR application. --> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>FCKeditor - Adobe AIR Sample</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <meta name="robots" content="noindex, nofollow" /> <link href="../sample.css" rel="stylesheet" type="text/css" /> <script type="text/javascript" src="../../fckeditor.js"></script> <style type="text/css"> body { margin: 10px ; } </style> </head> <body> <h1> FCKeditor - Adobe AIR Sample </h1> <div> This sample loads FCKeditor with full features enabled. </div> <hr /> <script type="text/javascript"> // Automatically calculates the editor base path based on the _samples directory. // This is usefull only for these samples. A real application should use something like this: // oFCKeditor.BasePath = '/fckeditor/' ; // '/fckeditor/' is the default value. var sBasePath = document.location.href.substring(0,document.location.href.lastIndexOf('_samples')) ; var oFCKeditor = new FCKeditor( 'FCKeditor1' ) ; oFCKeditor.BasePath = sBasePath ; oFCKeditor.Height = 400 ; oFCKeditor.Value = '<p>FCKeditor is in the <strong>AIR</strong>!<\/p>' ; oFCKeditor.Create() ; </script> </body> </html>
10npsite
trunk/guanli/system/fckeditor/_samples/adobeair/sample01.html
HTML
asf20
2,000
@ECHO OFF :: :: FCKeditor - The text editor for Internet - http://www.fckeditor.net :: Copyright (C) 2003-2009 Frederico Caldeira Knabben :: :: == BEGIN LICENSE == :: :: Licensed under the terms of any of the following licenses at your :: choice: :: :: - GNU General Public License Version 2 or later (the "GPL") :: http://www.gnu.org/licenses/gpl.html :: :: - GNU Lesser General Public License Version 2.1 or later (the "LGPL") :: http://www.gnu.org/licenses/lgpl.html :: :: - Mozilla Public License Version 1.1 or later (the "MPL") :: http://www.mozilla.org/MPL/MPL-1.1.html :: :: == END LICENSE == :: :: adl [-runtime runtime-directory] [-pubId publisher-id] [-nodebug] application.xml [rootdirectory] [-- arguments] "C:\Adobe AIR SDK\bin\adl" application.xml ../../
10npsite
trunk/guanli/system/fckeditor/_samples/adobeair/run.bat
Batchfile
asf20
811
@ECHO OFF :: :: FCKeditor - The text editor for Internet - http://www.fckeditor.net :: Copyright (C) 2003-2009 Frederico Caldeira Knabben :: :: == BEGIN LICENSE == :: :: Licensed under the terms of any of the following licenses at your :: choice: :: :: - GNU General Public License Version 2 or later (the "GPL") :: http://www.gnu.org/licenses/gpl.html :: :: - GNU Lesser General Public License Version 2.1 or later (the "LGPL") :: http://www.gnu.org/licenses/lgpl.html :: :: - Mozilla Public License Version 1.1 or later (the "MPL") :: http://www.mozilla.org/MPL/MPL-1.1.html :: :: == END LICENSE == :: :: adt -package SIGNING_OPTIONS air_file app_xml [file_or_dir | -C dir file_or_dir | -e file dir ...] ... "C:\Adobe AIR SDK\bin\adt" -package -storetype pkcs12 -keystore sample01_cert.pfx -storepass 123abc FCKeditor.air application.xml -C ../../ .
10npsite
trunk/guanli/system/fckeditor/_samples/adobeair/package.bat
Batchfile
asf20
893
/* * FCKeditor - The text editor for Internet - http://www.fckeditor.net * Copyright (C) 2003-2009 Frederico Caldeira Knabben * * == BEGIN LICENSE == * * Licensed under the terms of any of the following licenses at your * choice: * * - GNU General Public License Version 2 or later (the "GPL") * http://www.gnu.org/licenses/gpl.html * * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") * http://www.gnu.org/licenses/lgpl.html * * - Mozilla Public License Version 1.1 or later (the "MPL") * http://www.mozilla.org/MPL/MPL-1.1.html * * == END LICENSE == * * Styles used in the samples pages. */ body, td, th, input, select, textarea { font-size: 12px; font-family: Arial, Verdana, Sans-Serif; } h1 { font-weight: bold; font-size: 180%; margin-bottom: 10px; } form { margin: 0; padding: 0; } #outputSample { table-layout: fixed; width: 100%; } pre { margin: 0; padding: 0; white-space: pre; /* CSS2 */ white-space: -moz-pre-wrap; /* Mozilla*/ white-space: -o-pre-wrap; /* Opera 7 */ white-space: pre-wrap; /* CSS 2.1 */ white-space: pre-line; /* CSS 3 (and 2.1 as well, actually) */ word-wrap: break-word; /* IE */ } #outputSample thead th { color: #dddddd; background-color: #999999; padding: 4px; white-space: nowrap; } #outputSample tbody th { vertical-align: top; text-align: left; }
10npsite
trunk/guanli/system/fckeditor/_samples/sample.css
CSS
asf20
1,444
[//lasso /* * FCKeditor - The text editor for Internet - http://www.fckeditor.net * Copyright (C) 2003-2009 Frederico Caldeira Knabben * * == BEGIN LICENSE == * * Licensed under the terms of any of the following licenses at your * choice: * * - GNU General Public License Version 2 or later (the "GPL") * http://www.gnu.org/licenses/gpl.html * * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") * http://www.gnu.org/licenses/lgpl.html * * - Mozilla Public License Version 1.1 or later (the "MPL") * http://www.mozilla.org/MPL/MPL-1.1.html * * == END LICENSE == * * Sample page. */ ] <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html> <head> <title>FCKeditor - Sample</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <meta name="robots" content="noindex, nofollow"> <link href="../sample.css" rel="stylesheet" type="text/css" /> </head> <body> <h1>FCKeditor - Lasso - Sample 1</h1> This sample displays a normal HTML form with an FCKeditor with full features enabled. <hr> <form action="sampleposteddata.lasso" method="post" target="_blank"> [//lasso include('../../fckeditor.lasso'); var('basepath') = response_filepath->split('_samples')->get(1); var('myeditor') = fck_editor( -instancename='FCKeditor1', -basepath=$basepath, -initialvalue='<p>This is some <strong>sample text</strong>. You are using <a href="http://www.fckeditor.net/">FCKeditor</a>.</p>' ); $myeditor->create; ] <br> <input type="submit" value="Submit"> </form> </body> </html>
10npsite
trunk/guanli/system/fckeditor/_samples/lasso/sample01.lasso
Lasso
asf20
1,646
[//lasso /* * FCKeditor - The text editor for Internet - http://www.fckeditor.net * Copyright (C) 2003-2009 Frederico Caldeira Knabben * * == BEGIN LICENSE == * * Licensed under the terms of any of the following licenses at your * choice: * * - GNU General Public License Version 2 or later (the "GPL") * http://www.gnu.org/licenses/gpl.html * * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") * http://www.gnu.org/licenses/lgpl.html * * - Mozilla Public License Version 1.1 or later (the "MPL") * http://www.mozilla.org/MPL/MPL-1.1.html * * == END LICENSE == * * Sample page. */ ] <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html> <head> <title>FCKeditor - Sample</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <meta name="robots" content="noindex, nofollow"> <link href="../sample.css" rel="stylesheet" type="text/css" /> <script type="text/javascript"> <!-- function FCKeditor_OnComplete( editorInstance ) { var oCombo = document.getElementById( 'cmbSkins' ) ; // Get the active skin. var sSkin = editorInstance.Config['SkinPath'] ; sSkin = sSkin.match( /[^\/]+(?=\/$)/g ) ; oCombo.value = sSkin ; oCombo.style.visibility = '' ; } function ChangeSkin( skinName ) { window.location.href = window.location.pathname + "?Skin=" + skinName ; } //--> </script> </head> <body> <h1>FCKeditor - Lasso - Sample 4</h1> This sample shows how to change the editor skin. <hr> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td> Select the skin to load:&nbsp; </td> <td> <select id="cmbSkins" onchange="ChangeSkin(this.value);" style="VISIBILITY: hidden"> <option value="default" selected>Default</option> <option value="office2003">Office 2003</option> <option value="silver">Silver</option> </select> </td> </tr> </table> <br> <form action="sampleposteddata.lasso" method="post" target="_blank"> [//lasso include('../../fckeditor.lasso'); var('basepath') = response_filepath->split('_samples')->get(1); var('myeditor') = fck_editor( -instancename='FCKeditor1', -basepath=$basepath, -initialvalue='<p>This is some <strong>sample text</strong>. You are using <a href="http://www.fckeditor.net/">FCKeditor</a>.</p>' ); if(action_param('Skin')); var('skin') = (String_ReplaceRegExp: action_param('Skin'), -find='[^a-zA-Z0-9]', -replace=''); $myeditor->config = array('SkinPath' = $basepath + 'editor/skins/' + $skin + '/'); /if; $myeditor->create; ] <br> <input type="submit" value="Submit"> </form> </body> </html>
10npsite
trunk/guanli/system/fckeditor/_samples/lasso/sample04.lasso
Lasso
asf20
2,736
[//lasso /* * FCKeditor - The text editor for Internet - http://www.fckeditor.net * Copyright (C) 2003-2009 Frederico Caldeira Knabben * * == BEGIN LICENSE == * * Licensed under the terms of any of the following licenses at your * choice: * * - GNU General Public License Version 2 or later (the "GPL") * http://www.gnu.org/licenses/gpl.html * * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") * http://www.gnu.org/licenses/lgpl.html * * - Mozilla Public License Version 1.1 or later (the "MPL") * http://www.mozilla.org/MPL/MPL-1.1.html * * == END LICENSE == * * Sample page. */ ] <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html> <head> <title>FCKeditor - Samples - Posted Data</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <meta name="robots" content="noindex, nofollow"> <link href="../sample.css" rel="stylesheet" type="text/css"> </head> <body> <h1>FCKeditor - Samples - Posted Data</h1> This page lists all data posted by the form. <hr> <table border="1" cellspacing="0" id="outputSample"> <colgroup><col width="80"><col></colgroup> <thead> <tr> <th>Field Name</th> <th>Value</th> </tr> </thead> [iterate(client_postparams, local('this'))] <tr> <th>[Encode_HTML: #this->first]</th> <td><pre>[Encode_HTML: #this->second]</pre></td> </tr> [/iterate] </table> </body> </html>
10npsite
trunk/guanli/system/fckeditor/_samples/lasso/sampleposteddata.lasso
Lasso
asf20
1,501
[//lasso /* * FCKeditor - The text editor for Internet - http://www.fckeditor.net * Copyright (C) 2003-2009 Frederico Caldeira Knabben * * == BEGIN LICENSE == * * Licensed under the terms of any of the following licenses at your * choice: * * - GNU General Public License Version 2 or later (the "GPL") * http://www.gnu.org/licenses/gpl.html * * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") * http://www.gnu.org/licenses/lgpl.html * * - Mozilla Public License Version 1.1 or later (the "MPL") * http://www.mozilla.org/MPL/MPL-1.1.html * * == END LICENSE == * * Sample page. */ ] <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html> <head> <title>FCKeditor - Sample</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <meta name="robots" content="noindex, nofollow"> <link href="../sample.css" rel="stylesheet" type="text/css" /> <script type="text/javascript"> <!-- function FCKeditor_OnComplete( editorInstance ) { var oCombo = document.getElementById( 'cmbLanguages' ) ; for ( code in editorInstance.Language.AvailableLanguages ) { AddComboOption( oCombo, editorInstance.Language.AvailableLanguages[code] + ' (' + code + ')', code ) ; } oCombo.value = editorInstance.Language.ActiveLanguage.Code ; } function AddComboOption(combo, optionText, optionValue) { var oOption = document.createElement("OPTION") ; combo.options.add(oOption) ; oOption.innerHTML = optionText ; oOption.value = optionValue ; return oOption ; } function ChangeLanguage( languageCode ) { window.location.href = window.location.pathname + "?Lang=" + languageCode ; } //--> </script> </head> <body> <h1>FCKeditor - Lasso - Sample 2</h1> This sample shows the editor in all its available languages. <hr> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td> Select a language:&nbsp; </td> <td> <select id="cmbLanguages" onchange="ChangeLanguage(this.value);"> </select> </td> </tr> </table> <br> <form action="sampleposteddata.lasso" method="post" target="_blank"> [//lasso include('../../fckeditor.lasso'); var('basepath') = response_filepath->split('_samples')->get(1); if(action_param('Lang')); var('config') = array( 'AutoDetectLanguage' = 'false', 'DefaultLanguage' = (String_ReplaceRegExp: action_param('Lang'), -find='[^a-z\-]', -replace='') ); else; var('config') = array( 'AutoDetectLanguage' = 'true', 'DefaultLanguage' = 'en' ); /if; var('myeditor') = fck_editor( -instancename='FCKeditor1', -basepath=$basepath, -config=$config, -initialvalue='<p>This is some <strong>sample text</strong>. You are using <a href="http://www.fckeditor.net/">FCKeditor</a>.</p>' ); $myeditor->create; ] <br> <input type="submit" value="Submit"> </form> </body> </html>
10npsite
trunk/guanli/system/fckeditor/_samples/lasso/sample02.lasso
Lasso
asf20
2,988
[//lasso /* * FCKeditor - The text editor for Internet - http://www.fckeditor.net * Copyright (C) 2003-2009 Frederico Caldeira Knabben * * == BEGIN LICENSE == * * Licensed under the terms of any of the following licenses at your * choice: * * - GNU General Public License Version 2 or later (the "GPL") * http://www.gnu.org/licenses/gpl.html * * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") * http://www.gnu.org/licenses/lgpl.html * * - Mozilla Public License Version 1.1 or later (the "MPL") * http://www.mozilla.org/MPL/MPL-1.1.html * * == END LICENSE == * * Sample page. */ ] <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html> <head> <title>FCKeditor - Sample</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <meta name="robots" content="noindex, nofollow"> <link href="../sample.css" rel="stylesheet" type="text/css" /> <script type="text/javascript"> <!-- function FCKeditor_OnComplete( editorInstance ) { var oCombo = document.getElementById( 'cmbToolbars' ) ; oCombo.value = editorInstance.ToolbarSet.Name ; oCombo.style.visibility = '' ; } function ChangeToolbar( toolbarName ) { window.location.href = window.location.pathname + "?Toolbar=" + toolbarName ; } //--> </script> </head> <body> <h1>FCKeditor - Lasso - Sample 3</h1> This sample shows how to change the editor toolbar. <hr> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td> Select the toolbar to load:&nbsp; </td> <td> <select id="cmbToolbars" onchange="ChangeToolbar(this.value);" style="VISIBILITY: hidden"> <option value="Default" selected>Default</option> <option value="Basic">Basic</option> </select> </td> </tr> </table> <br> <form action="sampleposteddata.lasso" method="post" target="_blank"> [//lasso include('../../fckeditor.lasso'); var('basepath') = response_filepath->split('_samples')->get(1); var('myeditor') = fck_editor( -instancename='FCKeditor1', -basepath=$basepath, -initialvalue='<p>This is some <strong>sample text</strong>. You are using <a href="http://www.fckeditor.net/">FCKeditor</a>.</p>' ); if(action_param('Toolbar')); $myeditor->toolbarset = (String_ReplaceRegExp: action_param('Toolbar'), -find='[^a-zA-Z]', -replace=''); /if; $myeditor->create; ] <br> <input type="submit" value="Submit"> </form> </body> </html>
10npsite
trunk/guanli/system/fckeditor/_samples/lasso/sample03.lasso
Lasso
asf20
2,534
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" "http://www.w3.org/TR/html4/frameset.dtd"> <!-- * FCKeditor - The text editor for Internet - http://www.fckeditor.net * Copyright (C) 2003-2009 Frederico Caldeira Knabben * * == BEGIN LICENSE == * * Licensed under the terms of any of the following licenses at your * choice: * * - GNU General Public License Version 2 or later (the "GPL") * http://www.gnu.org/licenses/gpl.html * * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") * http://www.gnu.org/licenses/lgpl.html * * - Mozilla Public License Version 1.1 or later (the "MPL") * http://www.mozilla.org/MPL/MPL-1.1.html * * == END LICENSE == * * Samples Frameset page. --> <html> <head> <title>FCKeditor - Samples</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <meta name="robots" content="noindex, nofollow"> </head> <frameset rows="60,*"> <frame src="sampleslist.html" noresize scrolling="no"> <frame name="Sample" src="html/sample01.html" noresize> </frameset> </html>
10npsite
trunk/guanli/system/fckeditor/_samples/default.html
HTML
asf20
1,120
#!/usr/bin/env python """ FCKeditor - The text editor for Internet - http://www.fckeditor.net Copyright (C) 2003-2009 Frederico Caldeira Knabben == BEGIN LICENSE == Licensed under the terms of any of the following licenses at your choice: - GNU General Public License Version 2 or later (the "GPL") http://www.gnu.org/licenses/gpl.html - GNU Lesser General Public License Version 2.1 or later (the "LGPL") http://www.gnu.org/licenses/lgpl.html - Mozilla Public License Version 1.1 or later (the "MPL") http://www.mozilla.org/MPL/MPL-1.1.html == END LICENSE == Sample page. """ import cgi import os # Ensure that the fckeditor.py is included in your classpath import fckeditor # Tell the browser to render html print "Content-Type: text/html" print "" # Document header print """<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html> <head> <title>FCKeditor - Sample</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <meta name="robots" content="noindex, nofollow"> <link href="../sample.css" rel="stylesheet" type="text/css" /> </head> <body> <h1>FCKeditor - Python - Sample 1</h1> This sample displays a normal HTML form with an FCKeditor with full features enabled. <hr> <form action="sampleposteddata.py" method="post" target="_blank"> """ # This is the real work try: sBasePath = os.environ.get("SCRIPT_NAME") sBasePath = sBasePath[0:sBasePath.find("_samples")] oFCKeditor = fckeditor.FCKeditor('FCKeditor1') oFCKeditor.BasePath = sBasePath oFCKeditor.Value = """<p>This is some <strong>sample text</strong>. You are using <a href="http://www.fckeditor.net/">FCKeditor</a>.</p>""" print oFCKeditor.Create() except Exception, e: print e print """ <br> <input type="submit" value="Submit"> </form> """ # For testing your environments #print "<hr>" #for key in os.environ.keys(): # print "%s: %s<br>" % (key, os.environ.get(key, "")) #print "<hr>" # Document footer print """ </body> </html> """
10npsite
trunk/guanli/system/fckeditor/_samples/py/sample01.py
Python
asf20
2,083
#!/usr/bin/env python """ FCKeditor - The text editor for Internet - http://www.fckeditor.net Copyright (C) 2003-2009 Frederico Caldeira Knabben == BEGIN LICENSE == Licensed under the terms of any of the following licenses at your choice: - GNU General Public License Version 2 or later (the "GPL") http://www.gnu.org/licenses/gpl.html - GNU Lesser General Public License Version 2.1 or later (the "LGPL") http://www.gnu.org/licenses/lgpl.html - Mozilla Public License Version 1.1 or later (the "MPL") http://www.mozilla.org/MPL/MPL-1.1.html == END LICENSE == This page lists the data posted by a form. """ import cgi import os # Tell the browser to render html print "Content-Type: text/html" print "" try: # Create a cgi object form = cgi.FieldStorage() except Exception, e: print e # Document header print """<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html> <head> <title>FCKeditor - Samples - Posted Data</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <meta name="robots" content="noindex, nofollow"> <link href="../sample.css" rel="stylesheet" type="text/css" /> </head> <body> """ # This is the real work print """ <h1>FCKeditor - Samples - Posted Data</h1> This page lists all data posted by the form. <hr> <table border="1" cellspacing="0" id="outputSample"> <colgroup><col width="80"><col></colgroup> <thead> <tr> <th>Field Name</th> <th>Value</th> </tr> </thead> """ for key in form.keys(): try: value = form[key].value print """ <tr> <th>%s</th> <td><pre>%s</pre></td> </tr> """ % (cgi.escape(key), cgi.escape(value)) except Exception, e: print e print "</table>" # For testing your environments #print "<hr>" #for key in os.environ.keys(): # print "%s: %s<br>" % (key, os.environ.get(key, "")) #print "<hr>" # Document footer print """ </body> </html> """
10npsite
trunk/guanli/system/fckeditor/_samples/py/.svn/text-base/sampleposteddata.py.svn-base
Python
asf20
2,012
#!/usr/bin/env python """ FCKeditor - The text editor for Internet - http://www.fckeditor.net Copyright (C) 2003-2009 Frederico Caldeira Knabben == BEGIN LICENSE == Licensed under the terms of any of the following licenses at your choice: - GNU General Public License Version 2 or later (the "GPL") http://www.gnu.org/licenses/gpl.html - GNU Lesser General Public License Version 2.1 or later (the "LGPL") http://www.gnu.org/licenses/lgpl.html - Mozilla Public License Version 1.1 or later (the "MPL") http://www.mozilla.org/MPL/MPL-1.1.html == END LICENSE == Sample page. """ import cgi import os # Ensure that the fckeditor.py is included in your classpath import fckeditor # Tell the browser to render html print "Content-Type: text/html" print "" # Document header print """<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html> <head> <title>FCKeditor - Sample</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <meta name="robots" content="noindex, nofollow"> <link href="../sample.css" rel="stylesheet" type="text/css" /> </head> <body> <h1>FCKeditor - Python - Sample 1</h1> This sample displays a normal HTML form with an FCKeditor with full features enabled. <hr> <form action="sampleposteddata.py" method="post" target="_blank"> """ # This is the real work try: sBasePath = os.environ.get("SCRIPT_NAME") sBasePath = sBasePath[0:sBasePath.find("_samples")] oFCKeditor = fckeditor.FCKeditor('FCKeditor1') oFCKeditor.BasePath = sBasePath oFCKeditor.Value = """<p>This is some <strong>sample text</strong>. You are using <a href="http://www.fckeditor.net/">FCKeditor</a>.</p>""" print oFCKeditor.Create() except Exception, e: print e print """ <br> <input type="submit" value="Submit"> </form> """ # For testing your environments #print "<hr>" #for key in os.environ.keys(): # print "%s: %s<br>" % (key, os.environ.get(key, "")) #print "<hr>" # Document footer print """ </body> </html> """
10npsite
trunk/guanli/system/fckeditor/_samples/py/.svn/text-base/sample01.py.svn-base
Python
asf20
2,083
#!/usr/bin/env python """ FCKeditor - The text editor for Internet - http://www.fckeditor.net Copyright (C) 2003-2009 Frederico Caldeira Knabben == BEGIN LICENSE == Licensed under the terms of any of the following licenses at your choice: - GNU General Public License Version 2 or later (the "GPL") http://www.gnu.org/licenses/gpl.html - GNU Lesser General Public License Version 2.1 or later (the "LGPL") http://www.gnu.org/licenses/lgpl.html - Mozilla Public License Version 1.1 or later (the "MPL") http://www.mozilla.org/MPL/MPL-1.1.html == END LICENSE == This page lists the data posted by a form. """ import cgi import os # Tell the browser to render html print "Content-Type: text/html" print "" try: # Create a cgi object form = cgi.FieldStorage() except Exception, e: print e # Document header print """<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html> <head> <title>FCKeditor - Samples - Posted Data</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <meta name="robots" content="noindex, nofollow"> <link href="../sample.css" rel="stylesheet" type="text/css" /> </head> <body> """ # This is the real work print """ <h1>FCKeditor - Samples - Posted Data</h1> This page lists all data posted by the form. <hr> <table border="1" cellspacing="0" id="outputSample"> <colgroup><col width="80"><col></colgroup> <thead> <tr> <th>Field Name</th> <th>Value</th> </tr> </thead> """ for key in form.keys(): try: value = form[key].value print """ <tr> <th>%s</th> <td><pre>%s</pre></td> </tr> """ % (cgi.escape(key), cgi.escape(value)) except Exception, e: print e print "</table>" # For testing your environments #print "<hr>" #for key in os.environ.keys(): # print "%s: %s<br>" % (key, os.environ.get(key, "")) #print "<hr>" # Document footer print """ </body> </html> """
10npsite
trunk/guanli/system/fckeditor/_samples/py/sampleposteddata.py
Python
asf20
2,012
#!/usr/bin/env perl ##### # FCKeditor - The text editor for Internet - http://www.fckeditor.net # Copyright (C) 2003-2009 Frederico Caldeira Knabben # # == BEGIN LICENSE == # # Licensed under the terms of any of the following licenses at your # choice: # # - GNU General Public License Version 2 or later (the "GPL") # http://www.gnu.org/licenses/gpl.html # # - GNU Lesser General Public License Version 2.1 or later (the "LGPL") # http://www.gnu.org/licenses/lgpl.html # # - Mozilla Public License Version 1.1 or later (the "MPL") # http://www.mozilla.org/MPL/MPL-1.1.html # # == END LICENSE == # # Sample page. ##### ## START: Hack for Windows (Not important to understand the editor code... Perl specific). if(Windows_check()) { chdir(GetScriptPath($0)); } sub Windows_check { # IIS,PWS(NT/95) $www_server_os = $^O; # Win98 & NT(SP4) if($www_server_os eq "") { $www_server_os= $ENV{'OS'}; } # AnHTTPd/Omni/IIS if($ENV{'SERVER_SOFTWARE'} =~ /AnWeb|Omni|IIS\//i) { $www_server_os= 'win'; } # Win Apache if($ENV{'WINDIR'} ne "") { $www_server_os= 'win'; } if($www_server_os=~ /win/i) { return(1); } return(0); } sub GetScriptPath { local($path) = @_; if($path =~ /[\:\/\\]/) { $path =~ s/(.*?)[\/\\][^\/\\]+$/$1/; } else { $path = '.'; } $path; } ## END: Hack for IIS require '../../fckeditor.pl'; # When $ENV{'PATH_INFO'} cannot be used by perl. # $DefRootPath = "/XXXXX/_samples/perl/sample01.cgi"; Please write in script. my $DefServerPath = ""; my $ServerPath; $ServerPath = &GetServerPath(); print "Content-type: text/html\n\n"; print <<"_HTML_TAG_"; <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html> <head> <title>FCKeditor - Sample</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <meta name="robots" content="noindex, nofollow"> <link href="../sample.css" rel="stylesheet" type="text/css" /> </head> <body> <h1>FCKeditor - Perl - Sample 1</h1> This sample displays a normal HTML form with an FCKeditor with full features enabled. <hr> <form action="sampleposteddata.cgi" method="post" target="_blank"> _HTML_TAG_ #// Automatically calculates the editor base path based on the _samples directory. #// This is usefull only for these samples. A real application should use something like this: #// $oFCKeditor->BasePath = '/fckeditor/' ; // '/fckeditor/' is the default value. $sBasePath = $ServerPath; $sBasePath = substr($sBasePath,0,index($sBasePath,"_samples")); &FCKeditor('FCKeditor1'); $BasePath = $sBasePath; $Value = '<p>This is some <strong>sample text</strong>. You are using <a href="http://www.fckeditor.net/">FCKeditor</a>.</p>'; &Create(); print <<"_HTML_TAG_"; <br> <input type="submit" value="Submit"> </form> </body> </html> _HTML_TAG_ ################ #Please use this function, rewriting it depending on a server's environment. ################ sub GetServerPath { my $dir; if($DefServerPath) { $dir = $DefServerPath; } else { if($ENV{'PATH_INFO'}) { $dir = $ENV{'PATH_INFO'}; } elsif($ENV{'FILEPATH_INFO'}) { $dir = $ENV{'FILEPATH_INFO'}; } elsif($ENV{'REQUEST_URI'}) { $dir = $ENV{'REQUEST_URI'}; } } return($dir); }
10npsite
trunk/guanli/system/fckeditor/_samples/perl/sample01.cgi
Perl
asf20
3,330
#!/usr/bin/env perl ##### # FCKeditor - The text editor for Internet - http://www.fckeditor.net # Copyright (C) 2003-2009 Frederico Caldeira Knabben # # == BEGIN LICENSE == # # Licensed under the terms of any of the following licenses at your # choice: # # - GNU General Public License Version 2 or later (the "GPL") # http://www.gnu.org/licenses/gpl.html # # - GNU Lesser General Public License Version 2.1 or later (the "LGPL") # http://www.gnu.org/licenses/lgpl.html # # - Mozilla Public License Version 1.1 or later (the "MPL") # http://www.mozilla.org/MPL/MPL-1.1.html # # == END LICENSE == # # Sample page. ##### ## START: Hack for Windows (Not important to understand the editor code... Perl specific). if(Windows_check()) { chdir(GetScriptPath($0)); } sub Windows_check { # IIS,PWS(NT/95) $www_server_os = $^O; # Win98 & NT(SP4) if($www_server_os eq "") { $www_server_os= $ENV{'OS'}; } # AnHTTPd/Omni/IIS if($ENV{'SERVER_SOFTWARE'} =~ /AnWeb|Omni|IIS\//i) { $www_server_os= 'win'; } # Win Apache if($ENV{'WINDIR'} ne "") { $www_server_os= 'win'; } if($www_server_os=~ /win/i) { return(1); } return(0); } sub GetScriptPath { local($path) = @_; if($path =~ /[\:\/\\]/) { $path =~ s/(.*?)[\/\\][^\/\\]+$/$1/; } else { $path = '.'; } $path; } ## END: Hack for IIS require '../../fckeditor.pl'; # When $ENV{'PATH_INFO'} cannot be used by perl. # $DefRootPath = "/XXXXX/_samples/perl/sample03.cgi"; Please write in script. my $DefServerPath = ""; my $ServerPath; $ServerPath = &GetServerPath(); if($ENV{'REQUEST_METHOD'} eq "POST") { read(STDIN, $buffer, $ENV{'CONTENT_LENGTH'}); } else { $buffer = $ENV{'QUERY_STRING'}; } @pairs = split(/&/,$buffer); foreach $pair (@pairs) { ($name,$value) = split(/=/,$pair); $value =~ tr/+/ /; $value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg; $value =~ s/\t//g; $value =~ s/\r\n/\n/g; $FORM{$name} .= "\0" if(defined($FORM{$name})); $FORM{$name} .= $value; } print "Content-type: text/html\n\n"; print <<"_HTML_TAG_"; <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html> <head> <title>FCKeditor - Sample</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <meta name="robots" content="noindex, nofollow"> <link href="../sample.css" rel="stylesheet" type="text/css" /> <script type="text/javascript"> function FCKeditor_OnComplete( editorInstance ) { var oCombo = document.getElementById( 'cmbToolbars' ) ; oCombo.value = editorInstance.ToolbarSet.Name ; oCombo.style.visibility = '' ; } function ChangeToolbar( toolbarName ) { window.location.href = window.location.pathname + "?Toolbar=" + toolbarName ; } </script> </head> <body> <h1>FCKeditor - Perl - Sample 3</h1> This sample shows how to change the editor toolbar. <hr> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td> Select the toolbar to load:&nbsp; </td> <td> <select id="cmbToolbars" onchange="ChangeToolbar(this.value);" style="VISIBILITY: hidden"> <option value="Default" selected>Default</option> <option value="Basic">Basic</option> </select> </td> </tr> </table> <br> <form action="sampleposteddata.cgi" method="post" target="_blank"> _HTML_TAG_ #// Automatically calculates the editor base path based on the _samples directory. #// This is usefull only for these samples. A real application should use something like this: #// $oFCKeditor->BasePath = '/fckeditor/' ; // '/fckeditor/' is the default value. $sBasePath = $ServerPath; $sBasePath = substr($sBasePath, 0, index( $sBasePath, "_samples" )); &FCKeditor('FCKeditor1') ; $BasePath = $sBasePath ; if($FORM{'Toolbar'} ne "") { $ToolbarSet = $FORM{'Toolbar'}; $ToolbarSet =~ s/[^a-z]//ig; } $Value = '<p>This is some <strong>sample text</strong>. You are using <a href="http://www.fckeditor.net/">FCKeditor</a>.</p>' ; &Create(); print <<"_HTML_TAG_"; <br> <input type="submit" value="Submit"> </form> </body> </html> _HTML_TAG_ ################ #Please use this function, rewriting it depending on a server's environment. ################ sub GetServerPath { my $dir; if($DefServerPath) { $dir = $DefServerPath; } else { if($ENV{'PATH_INFO'}) { $dir = $ENV{'PATH_INFO'}; } elsif($ENV{'FILEPATH_INFO'}) { $dir = $ENV{'FILEPATH_INFO'}; } elsif($ENV{'REQUEST_URI'}) { $dir = $ENV{'REQUEST_URI'}; } } return($dir); }
10npsite
trunk/guanli/system/fckeditor/_samples/perl/.svn/text-base/sample03.cgi.svn-base
Perl
asf20
4,628
#!/usr/bin/env perl ##### # FCKeditor - The text editor for Internet - http://www.fckeditor.net # Copyright (C) 2003-2009 Frederico Caldeira Knabben # # == BEGIN LICENSE == # # Licensed under the terms of any of the following licenses at your # choice: # # - GNU General Public License Version 2 or later (the "GPL") # http://www.gnu.org/licenses/gpl.html # # - GNU Lesser General Public License Version 2.1 or later (the "LGPL") # http://www.gnu.org/licenses/lgpl.html # # - Mozilla Public License Version 1.1 or later (the "MPL") # http://www.mozilla.org/MPL/MPL-1.1.html # # == END LICENSE == # # Sample page. ##### ## START: Hack for Windows (Not important to understand the editor code... Perl specific). if(Windows_check()) { chdir(GetScriptPath($0)); } sub Windows_check { # IIS,PWS(NT/95) $www_server_os = $^O; # Win98 & NT(SP4) if($www_server_os eq "") { $www_server_os= $ENV{'OS'}; } # AnHTTPd/Omni/IIS if($ENV{'SERVER_SOFTWARE'} =~ /AnWeb|Omni|IIS\//i) { $www_server_os= 'win'; } # Win Apache if($ENV{'WINDIR'} ne "") { $www_server_os= 'win'; } if($www_server_os=~ /win/i) { return(1); } return(0); } sub GetScriptPath { local($path) = @_; if($path =~ /[\:\/\\]/) { $path =~ s/(.*?)[\/\\][^\/\\]+$/$1/; } else { $path = '.'; } $path; } ## END: Hack for IIS require '../../fckeditor.pl'; # When $ENV{'PATH_INFO'} cannot be used by perl. # $DefRootPath = "/XXXXX/_samples/perl/sample04.cgi"; Please write in script. my $DefServerPath = ""; my $ServerPath; $ServerPath = &GetServerPath(); if($ENV{'REQUEST_METHOD'} eq "POST") { read(STDIN, $buffer, $ENV{'CONTENT_LENGTH'}); } else { $buffer = $ENV{'QUERY_STRING'}; } @pairs = split(/&/,$buffer); foreach $pair (@pairs) { ($name,$value) = split(/=/,$pair); $value =~ tr/+/ /; $value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg; $value =~ s/\t//g; $value =~ s/\r\n/\n/g; $FORM{$name} .= "\0" if(defined($FORM{$name})); $FORM{$name} .= $value; } #!!Caution javascript \ Quart print "Content-type: text/html\n\n"; print <<"_HTML_TAG_"; <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html> <head> <title>FCKeditor - Sample</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <meta name="robots" content="noindex, nofollow"> <link href="../sample.css" rel="stylesheet" type="text/css" /> <script type="text/javascript"> function FCKeditor_OnComplete( editorInstance ) { var oCombo = document.getElementById( 'cmbSkins' ) ; // Get the active skin. var sSkin = editorInstance.Config['SkinPath'] ; sSkin = sSkin.match(/[^\\/]+(?=\\/\$)/g) ; oCombo.value = sSkin ; oCombo.style.visibility = '' ; } function ChangeSkin( skinName ) { window.location.href = window.location.pathname + "?Skin=" + skinName ; } </script> </head> <body> <h1>FCKeditor - Perl - Sample 4</h1> This sample shows how to change the editor skin. <hr> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td> Select the skin to load:&nbsp; </td> <td> <select id="cmbSkins" onchange="ChangeSkin(this.value);" style="VISIBILITY: hidden"> <option value="default" selected>Default</option> <option value="office2003">Office 2003</option> <option value="silver">Silver</option> </select> </td> </tr> </table> <br> <form action="sampleposteddata.cgi" method="post" target="_blank"> _HTML_TAG_ #// Automatically calculates the editor base path based on the _samples directory. #// This is usefull only for these samples. A real application should use something like this: #// $oFCKeditor->BasePath = '/fckeditor/' ; // '/fckeditor/' is the default value. $sBasePath = $ServerPath; $sBasePath = substr( $sBasePath, 0, index( $sBasePath, "_samples" ) ) ; &FCKeditor('FCKeditor1'); $BasePath = $sBasePath; if($FORM{'Skin'} ne "") { $skin = $FORM{'Skin'}; $skin =~ s/[^a-z0-9]//ig; $Config{'SkinPath'} = $sBasePath . 'editor/skins/' . $skin . '/' ; } $Value = '<p>This is some <strong>sample text</strong>. You are using <a href="http://www.fckeditor.net/">FCKeditor</a>.</p>' ; &Create() ; print <<"_HTML_TAG_"; <br> <input type="submit" value="Submit"> </form> </body> </html> _HTML_TAG_ ################ #Please use this function, rewriting it depending on a server's environment. ################ sub GetServerPath { my $dir; if($DefServerPath) { $dir = $DefServerPath; } else { if($ENV{'PATH_INFO'}) { $dir = $ENV{'PATH_INFO'}; } elsif($ENV{'FILEPATH_INFO'}) { $dir = $ENV{'FILEPATH_INFO'}; } elsif($ENV{'REQUEST_URI'}) { $dir = $ENV{'REQUEST_URI'}; } } return($dir); }
10npsite
trunk/guanli/system/fckeditor/_samples/perl/.svn/text-base/sample04.cgi.svn-base
Perl
asf20
4,846
#!/usr/bin/env perl ##### # FCKeditor - The text editor for Internet - http://www.fckeditor.net # Copyright (C) 2003-2009 Frederico Caldeira Knabben # # == BEGIN LICENSE == # # Licensed under the terms of any of the following licenses at your # choice: # # - GNU General Public License Version 2 or later (the "GPL") # http://www.gnu.org/licenses/gpl.html # # - GNU Lesser General Public License Version 2.1 or later (the "LGPL") # http://www.gnu.org/licenses/lgpl.html # # - Mozilla Public License Version 1.1 or later (the "MPL") # http://www.mozilla.org/MPL/MPL-1.1.html # # == END LICENSE == # # Sample page. ##### ## START: Hack for Windows (Not important to understand the editor code... Perl specific). if(Windows_check()) { chdir(GetScriptPath($0)); } sub Windows_check { # IIS,PWS(NT/95) $www_server_os = $^O; # Win98 & NT(SP4) if($www_server_os eq "") { $www_server_os= $ENV{'OS'}; } # AnHTTPd/Omni/IIS if($ENV{'SERVER_SOFTWARE'} =~ /AnWeb|Omni|IIS\//i) { $www_server_os= 'win'; } # Win Apache if($ENV{'WINDIR'} ne "") { $www_server_os= 'win'; } if($www_server_os=~ /win/i) { return(1); } return(0); } sub GetScriptPath { local($path) = @_; if($path =~ /[\:\/\\]/) { $path =~ s/(.*?)[\/\\][^\/\\]+$/$1/; } else { $path = '.'; } $path; } ## END: Hack for IIS require '../../fckeditor.pl'; # When $ENV{'PATH_INFO'} cannot be used by perl. # $DefRootPath = "/XXXXX/_samples/perl/sample02.cgi"; Please write in script. my $DefServerPath = ""; my $ServerPath; $ServerPath = &GetServerPath(); if($ENV{'REQUEST_METHOD'} eq "POST") { read(STDIN, $buffer, $ENV{'CONTENT_LENGTH'}); } else { $buffer = $ENV{'QUERY_STRING'}; } @pairs = split(/&/,$buffer); foreach $pair (@pairs) { ($name,$value) = split(/=/,$pair); $value =~ tr/+/ /; $value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg; $value =~ s/\t//g; $value =~ s/\r\n/\n/g; $FORM{$name} .= "\0" if(defined($FORM{$name})); $FORM{$name} .= $value; } print "Content-type: text/html\n\n"; print <<"_HTML_TAG_"; <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html> <head> <title>FCKeditor - Sample</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <meta name="robots" content="noindex, nofollow"> <link href="../sample.css" rel="stylesheet" type="text/css" /> <script type="text/javascript"> function FCKeditor_OnComplete( editorInstance ) { var oCombo = document.getElementById( 'cmbLanguages' ) ; for ( code in editorInstance.Language.AvailableLanguages ) { AddComboOption( oCombo, editorInstance.Language.AvailableLanguages[code] + ' (' + code + ')', code ) ; } oCombo.value = editorInstance.Language.ActiveLanguage.Code ; } function AddComboOption(combo, optionText, optionValue) { var oOption = document.createElement("OPTION") ; combo.options.add(oOption) ; oOption.innerHTML = optionText ; oOption.value = optionValue ; return oOption ; } function ChangeLanguage( languageCode ) { window.location.href = window.location.pathname + "?Lang=" + languageCode ; } </script> </head> <body> <h1>FCKeditor - Perl - Sample 2</h1> This sample shows the editor in all its available languages. <hr> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td> Select a language:&nbsp; </td> <td> <select id="cmbLanguages" onchange="ChangeLanguage(this.value);"> </select> </td> </tr> </table> <br> <form action="sampleposteddata.cgi" method="post" target="_blank"> _HTML_TAG_ #// Automatically calculates the editor base path based on the _samples directory. #// This is usefull only for these samples. A real application should use something like this: #// $oFCKeditor->BasePath = '/fckeditor/' ; // '/fckeditor/' is the default value. $sBasePath = $ServerPath; $sBasePath = substr( $sBasePath, 0, index($sBasePath,"_samples")); &FCKeditor('FCKeditor1'); $BasePath = $sBasePath; if($FORM{'Lang'} ne "") { $Config{'AutoDetectLanguage'} = "false"; $lang = $FORM{'Lang'}; $lang =~ s/[^a-z\-]//ig; $Config{'DefaultLanguage'} = $lang; } else { $Config{'AutoDetectLanguage'} = "true"; $Config{'DefaultLanguage'} = 'en' ; } $Value = '<p>This is some <strong>sample text</strong>. You are using <a href="http://www.fckeditor.net/">FCKeditor</a>.</p>' ; &Create(); print <<"_HTML_TAG_"; <br> <input type="submit" value="Submit"> </form> </body> </html> _HTML_TAG_ ################ #Please use this function, rewriting it depending on a server's environment. ################ sub GetServerPath { my $dir; if($DefServerPath) { $dir = $DefServerPath; } else { if($ENV{'PATH_INFO'}) { $dir = $ENV{'PATH_INFO'}; } elsif($ENV{'FILEPATH_INFO'}) { $dir = $ENV{'FILEPATH_INFO'}; } elsif($ENV{'REQUEST_URI'}) { $dir = $ENV{'REQUEST_URI'}; } } return($dir); }
10npsite
trunk/guanli/system/fckeditor/_samples/perl/.svn/text-base/sample02.cgi.svn-base
Perl
asf20
5,053
#!/usr/bin/env perl ##### # FCKeditor - The text editor for Internet - http://www.fckeditor.net # Copyright (C) 2003-2009 Frederico Caldeira Knabben # # == BEGIN LICENSE == # # Licensed under the terms of any of the following licenses at your # choice: # # - GNU General Public License Version 2 or later (the "GPL") # http://www.gnu.org/licenses/gpl.html # # - GNU Lesser General Public License Version 2.1 or later (the "LGPL") # http://www.gnu.org/licenses/lgpl.html # # - Mozilla Public License Version 1.1 or later (the "MPL") # http://www.mozilla.org/MPL/MPL-1.1.html # # == END LICENSE == # # Sample page. ##### ## START: Hack for Windows (Not important to understand the editor code... Perl specific). if(Windows_check()) { chdir(GetScriptPath($0)); } sub Windows_check { # IIS,PWS(NT/95) $www_server_os = $^O; # Win98 & NT(SP4) if($www_server_os eq "") { $www_server_os= $ENV{'OS'}; } # AnHTTPd/Omni/IIS if($ENV{'SERVER_SOFTWARE'} =~ /AnWeb|Omni|IIS\//i) { $www_server_os= 'win'; } # Win Apache if($ENV{'WINDIR'} ne "") { $www_server_os= 'win'; } if($www_server_os=~ /win/i) { return(1); } return(0); } sub GetScriptPath { local($path) = @_; if($path =~ /[\:\/\\]/) { $path =~ s/(.*?)[\/\\][^\/\\]+$/$1/; } else { $path = '.'; } $path; } ## END: Hack for IIS require '../../fckeditor.pl'; # When $ENV{'PATH_INFO'} cannot be used by perl. # $DefRootPath = "/XXXXX/_samples/perl/sample01.cgi"; Please write in script. my $DefServerPath = ""; my $ServerPath; $ServerPath = &GetServerPath(); print "Content-type: text/html\n\n"; print <<"_HTML_TAG_"; <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html> <head> <title>FCKeditor - Sample</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <meta name="robots" content="noindex, nofollow"> <link href="../sample.css" rel="stylesheet" type="text/css" /> </head> <body> <h1>FCKeditor - Perl - Sample 1</h1> This sample displays a normal HTML form with an FCKeditor with full features enabled. <hr> <form action="sampleposteddata.cgi" method="post" target="_blank"> _HTML_TAG_ #// Automatically calculates the editor base path based on the _samples directory. #// This is usefull only for these samples. A real application should use something like this: #// $oFCKeditor->BasePath = '/fckeditor/' ; // '/fckeditor/' is the default value. $sBasePath = $ServerPath; $sBasePath = substr($sBasePath,0,index($sBasePath,"_samples")); &FCKeditor('FCKeditor1'); $BasePath = $sBasePath; $Value = '<p>This is some <strong>sample text</strong>. You are using <a href="http://www.fckeditor.net/">FCKeditor</a>.</p>'; &Create(); print <<"_HTML_TAG_"; <br> <input type="submit" value="Submit"> </form> </body> </html> _HTML_TAG_ ################ #Please use this function, rewriting it depending on a server's environment. ################ sub GetServerPath { my $dir; if($DefServerPath) { $dir = $DefServerPath; } else { if($ENV{'PATH_INFO'}) { $dir = $ENV{'PATH_INFO'}; } elsif($ENV{'FILEPATH_INFO'}) { $dir = $ENV{'FILEPATH_INFO'}; } elsif($ENV{'REQUEST_URI'}) { $dir = $ENV{'REQUEST_URI'}; } } return($dir); }
10npsite
trunk/guanli/system/fckeditor/_samples/perl/.svn/text-base/sample01.cgi.svn-base
Perl
asf20
3,330
#!/usr/bin/env perl ##### # FCKeditor - The text editor for Internet - http://www.fckeditor.net # Copyright (C) 2003-2009 Frederico Caldeira Knabben # # == BEGIN LICENSE == # # Licensed under the terms of any of the following licenses at your # choice: # # - GNU General Public License Version 2 or later (the "GPL") # http://www.gnu.org/licenses/gpl.html # # - GNU Lesser General Public License Version 2.1 or later (the "LGPL") # http://www.gnu.org/licenses/lgpl.html # # - Mozilla Public License Version 1.1 or later (the "MPL") # http://www.mozilla.org/MPL/MPL-1.1.html # # == END LICENSE == # # This page lists the data posted by a form. ##### ## START: Hack for Windows (Not important to understand the editor code... Perl specific). if(Windows_check()) { chdir(GetScriptPath($0)); } sub Windows_check { # IIS,PWS(NT/95) $www_server_os = $^O; # Win98 & NT(SP4) if($www_server_os eq "") { $www_server_os= $ENV{'OS'}; } # AnHTTPd/Omni/IIS if($ENV{'SERVER_SOFTWARE'} =~ /AnWeb|Omni|IIS\//i) { $www_server_os= 'win'; } # Win Apache if($ENV{'WINDIR'} ne "") { $www_server_os= 'win'; } if($www_server_os=~ /win/i) { return(1); } return(0); } sub GetScriptPath { local($path) = @_; if($path =~ /[\:\/\\]/) { $path =~ s/(.*?)[\/\\][^\/\\]+$/$1/; } else { $path = '.'; } $path; } ## END: Hack for IIS require '../../fckeditor.pl'; if($ENV{'REQUEST_METHOD'} eq "POST") { read(STDIN, $buffer, $ENV{'CONTENT_LENGTH'}); } else { $buffer = $ENV{'QUERY_STRING'}; } @pairs = split(/&/,$buffer); foreach $pair (@pairs) { ($name,$value) = split(/=/,$pair); $value =~ tr/+/ /; $value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg; $value =~ s/\t//g; $value =~ s/\r\n/\n/g; $FORM{$name} .= "\0" if(defined($FORM{$name})); $FORM{$name} .= $value; } print "Content-type: text/html\n\n"; print <<"_HTML_TAG_"; <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html> <head> <title>FCKeditor - Samples - Posted Data</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <meta name="robots" content="noindex, nofollow"> <link href="../sample.css" rel="stylesheet" type="text/css" > </head> <body> <h1>FCKeditor - Samples - Posted Data</h1> This page lists all data posted by the form. <hr> <table border="1" cellspacing="0" id="outputSample"> <colgroup><col width="80"><col></colgroup> <thead> <tr> <th>Field Name</th> <th>Value</th> </tr> </thead> _HTML_TAG_ foreach $key (keys %FORM) { $postedValue = &specialchar_cnv($FORM{$key}); $key = &specialchar_cnv($key); print <<"_HTML_TAG_"; <tr> <th>$key</th> <td><pre>$postedValue</pre></td> </tr> _HTML_TAG_ } print <<"_HTML_TAG_"; </table> </body> </html> _HTML_TAG_
10npsite
trunk/guanli/system/fckeditor/_samples/perl/.svn/text-base/sampleposteddata.cgi.svn-base
Perl
asf20
2,895
#!/usr/bin/env perl ##### # FCKeditor - The text editor for Internet - http://www.fckeditor.net # Copyright (C) 2003-2009 Frederico Caldeira Knabben # # == BEGIN LICENSE == # # Licensed under the terms of any of the following licenses at your # choice: # # - GNU General Public License Version 2 or later (the "GPL") # http://www.gnu.org/licenses/gpl.html # # - GNU Lesser General Public License Version 2.1 or later (the "LGPL") # http://www.gnu.org/licenses/lgpl.html # # - Mozilla Public License Version 1.1 or later (the "MPL") # http://www.mozilla.org/MPL/MPL-1.1.html # # == END LICENSE == # # This page lists the data posted by a form. ##### ## START: Hack for Windows (Not important to understand the editor code... Perl specific). if(Windows_check()) { chdir(GetScriptPath($0)); } sub Windows_check { # IIS,PWS(NT/95) $www_server_os = $^O; # Win98 & NT(SP4) if($www_server_os eq "") { $www_server_os= $ENV{'OS'}; } # AnHTTPd/Omni/IIS if($ENV{'SERVER_SOFTWARE'} =~ /AnWeb|Omni|IIS\//i) { $www_server_os= 'win'; } # Win Apache if($ENV{'WINDIR'} ne "") { $www_server_os= 'win'; } if($www_server_os=~ /win/i) { return(1); } return(0); } sub GetScriptPath { local($path) = @_; if($path =~ /[\:\/\\]/) { $path =~ s/(.*?)[\/\\][^\/\\]+$/$1/; } else { $path = '.'; } $path; } ## END: Hack for IIS require '../../fckeditor.pl'; if($ENV{'REQUEST_METHOD'} eq "POST") { read(STDIN, $buffer, $ENV{'CONTENT_LENGTH'}); } else { $buffer = $ENV{'QUERY_STRING'}; } @pairs = split(/&/,$buffer); foreach $pair (@pairs) { ($name,$value) = split(/=/,$pair); $value =~ tr/+/ /; $value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg; $value =~ s/\t//g; $value =~ s/\r\n/\n/g; $FORM{$name} .= "\0" if(defined($FORM{$name})); $FORM{$name} .= $value; } print "Content-type: text/html\n\n"; print <<"_HTML_TAG_"; <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html> <head> <title>FCKeditor - Samples - Posted Data</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <meta name="robots" content="noindex, nofollow"> <link href="../sample.css" rel="stylesheet" type="text/css" > </head> <body> <h1>FCKeditor - Samples - Posted Data</h1> This page lists all data posted by the form. <hr> <table border="1" cellspacing="0" id="outputSample"> <colgroup><col width="80"><col></colgroup> <thead> <tr> <th>Field Name</th> <th>Value</th> </tr> </thead> _HTML_TAG_ foreach $key (keys %FORM) { $postedValue = &specialchar_cnv($FORM{$key}); $key = &specialchar_cnv($key); print <<"_HTML_TAG_"; <tr> <th>$key</th> <td><pre>$postedValue</pre></td> </tr> _HTML_TAG_ } print <<"_HTML_TAG_"; </table> </body> </html> _HTML_TAG_
10npsite
trunk/guanli/system/fckeditor/_samples/perl/sampleposteddata.cgi
Perl
asf20
2,895
#!/usr/bin/env perl ##### # FCKeditor - The text editor for Internet - http://www.fckeditor.net # Copyright (C) 2003-2009 Frederico Caldeira Knabben # # == BEGIN LICENSE == # # Licensed under the terms of any of the following licenses at your # choice: # # - GNU General Public License Version 2 or later (the "GPL") # http://www.gnu.org/licenses/gpl.html # # - GNU Lesser General Public License Version 2.1 or later (the "LGPL") # http://www.gnu.org/licenses/lgpl.html # # - Mozilla Public License Version 1.1 or later (the "MPL") # http://www.mozilla.org/MPL/MPL-1.1.html # # == END LICENSE == # # Sample page. ##### ## START: Hack for Windows (Not important to understand the editor code... Perl specific). if(Windows_check()) { chdir(GetScriptPath($0)); } sub Windows_check { # IIS,PWS(NT/95) $www_server_os = $^O; # Win98 & NT(SP4) if($www_server_os eq "") { $www_server_os= $ENV{'OS'}; } # AnHTTPd/Omni/IIS if($ENV{'SERVER_SOFTWARE'} =~ /AnWeb|Omni|IIS\//i) { $www_server_os= 'win'; } # Win Apache if($ENV{'WINDIR'} ne "") { $www_server_os= 'win'; } if($www_server_os=~ /win/i) { return(1); } return(0); } sub GetScriptPath { local($path) = @_; if($path =~ /[\:\/\\]/) { $path =~ s/(.*?)[\/\\][^\/\\]+$/$1/; } else { $path = '.'; } $path; } ## END: Hack for IIS require '../../fckeditor.pl'; # When $ENV{'PATH_INFO'} cannot be used by perl. # $DefRootPath = "/XXXXX/_samples/perl/sample03.cgi"; Please write in script. my $DefServerPath = ""; my $ServerPath; $ServerPath = &GetServerPath(); if($ENV{'REQUEST_METHOD'} eq "POST") { read(STDIN, $buffer, $ENV{'CONTENT_LENGTH'}); } else { $buffer = $ENV{'QUERY_STRING'}; } @pairs = split(/&/,$buffer); foreach $pair (@pairs) { ($name,$value) = split(/=/,$pair); $value =~ tr/+/ /; $value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg; $value =~ s/\t//g; $value =~ s/\r\n/\n/g; $FORM{$name} .= "\0" if(defined($FORM{$name})); $FORM{$name} .= $value; } print "Content-type: text/html\n\n"; print <<"_HTML_TAG_"; <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html> <head> <title>FCKeditor - Sample</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <meta name="robots" content="noindex, nofollow"> <link href="../sample.css" rel="stylesheet" type="text/css" /> <script type="text/javascript"> function FCKeditor_OnComplete( editorInstance ) { var oCombo = document.getElementById( 'cmbToolbars' ) ; oCombo.value = editorInstance.ToolbarSet.Name ; oCombo.style.visibility = '' ; } function ChangeToolbar( toolbarName ) { window.location.href = window.location.pathname + "?Toolbar=" + toolbarName ; } </script> </head> <body> <h1>FCKeditor - Perl - Sample 3</h1> This sample shows how to change the editor toolbar. <hr> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td> Select the toolbar to load:&nbsp; </td> <td> <select id="cmbToolbars" onchange="ChangeToolbar(this.value);" style="VISIBILITY: hidden"> <option value="Default" selected>Default</option> <option value="Basic">Basic</option> </select> </td> </tr> </table> <br> <form action="sampleposteddata.cgi" method="post" target="_blank"> _HTML_TAG_ #// Automatically calculates the editor base path based on the _samples directory. #// This is usefull only for these samples. A real application should use something like this: #// $oFCKeditor->BasePath = '/fckeditor/' ; // '/fckeditor/' is the default value. $sBasePath = $ServerPath; $sBasePath = substr($sBasePath, 0, index( $sBasePath, "_samples" )); &FCKeditor('FCKeditor1') ; $BasePath = $sBasePath ; if($FORM{'Toolbar'} ne "") { $ToolbarSet = $FORM{'Toolbar'}; $ToolbarSet =~ s/[^a-z]//ig; } $Value = '<p>This is some <strong>sample text</strong>. You are using <a href="http://www.fckeditor.net/">FCKeditor</a>.</p>' ; &Create(); print <<"_HTML_TAG_"; <br> <input type="submit" value="Submit"> </form> </body> </html> _HTML_TAG_ ################ #Please use this function, rewriting it depending on a server's environment. ################ sub GetServerPath { my $dir; if($DefServerPath) { $dir = $DefServerPath; } else { if($ENV{'PATH_INFO'}) { $dir = $ENV{'PATH_INFO'}; } elsif($ENV{'FILEPATH_INFO'}) { $dir = $ENV{'FILEPATH_INFO'}; } elsif($ENV{'REQUEST_URI'}) { $dir = $ENV{'REQUEST_URI'}; } } return($dir); }
10npsite
trunk/guanli/system/fckeditor/_samples/perl/sample03.cgi
Perl
asf20
4,628
#!/usr/bin/env perl ##### # FCKeditor - The text editor for Internet - http://www.fckeditor.net # Copyright (C) 2003-2009 Frederico Caldeira Knabben # # == BEGIN LICENSE == # # Licensed under the terms of any of the following licenses at your # choice: # # - GNU General Public License Version 2 or later (the "GPL") # http://www.gnu.org/licenses/gpl.html # # - GNU Lesser General Public License Version 2.1 or later (the "LGPL") # http://www.gnu.org/licenses/lgpl.html # # - Mozilla Public License Version 1.1 or later (the "MPL") # http://www.mozilla.org/MPL/MPL-1.1.html # # == END LICENSE == # # Sample page. ##### ## START: Hack for Windows (Not important to understand the editor code... Perl specific). if(Windows_check()) { chdir(GetScriptPath($0)); } sub Windows_check { # IIS,PWS(NT/95) $www_server_os = $^O; # Win98 & NT(SP4) if($www_server_os eq "") { $www_server_os= $ENV{'OS'}; } # AnHTTPd/Omni/IIS if($ENV{'SERVER_SOFTWARE'} =~ /AnWeb|Omni|IIS\//i) { $www_server_os= 'win'; } # Win Apache if($ENV{'WINDIR'} ne "") { $www_server_os= 'win'; } if($www_server_os=~ /win/i) { return(1); } return(0); } sub GetScriptPath { local($path) = @_; if($path =~ /[\:\/\\]/) { $path =~ s/(.*?)[\/\\][^\/\\]+$/$1/; } else { $path = '.'; } $path; } ## END: Hack for IIS require '../../fckeditor.pl'; # When $ENV{'PATH_INFO'} cannot be used by perl. # $DefRootPath = "/XXXXX/_samples/perl/sample02.cgi"; Please write in script. my $DefServerPath = ""; my $ServerPath; $ServerPath = &GetServerPath(); if($ENV{'REQUEST_METHOD'} eq "POST") { read(STDIN, $buffer, $ENV{'CONTENT_LENGTH'}); } else { $buffer = $ENV{'QUERY_STRING'}; } @pairs = split(/&/,$buffer); foreach $pair (@pairs) { ($name,$value) = split(/=/,$pair); $value =~ tr/+/ /; $value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg; $value =~ s/\t//g; $value =~ s/\r\n/\n/g; $FORM{$name} .= "\0" if(defined($FORM{$name})); $FORM{$name} .= $value; } print "Content-type: text/html\n\n"; print <<"_HTML_TAG_"; <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html> <head> <title>FCKeditor - Sample</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <meta name="robots" content="noindex, nofollow"> <link href="../sample.css" rel="stylesheet" type="text/css" /> <script type="text/javascript"> function FCKeditor_OnComplete( editorInstance ) { var oCombo = document.getElementById( 'cmbLanguages' ) ; for ( code in editorInstance.Language.AvailableLanguages ) { AddComboOption( oCombo, editorInstance.Language.AvailableLanguages[code] + ' (' + code + ')', code ) ; } oCombo.value = editorInstance.Language.ActiveLanguage.Code ; } function AddComboOption(combo, optionText, optionValue) { var oOption = document.createElement("OPTION") ; combo.options.add(oOption) ; oOption.innerHTML = optionText ; oOption.value = optionValue ; return oOption ; } function ChangeLanguage( languageCode ) { window.location.href = window.location.pathname + "?Lang=" + languageCode ; } </script> </head> <body> <h1>FCKeditor - Perl - Sample 2</h1> This sample shows the editor in all its available languages. <hr> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td> Select a language:&nbsp; </td> <td> <select id="cmbLanguages" onchange="ChangeLanguage(this.value);"> </select> </td> </tr> </table> <br> <form action="sampleposteddata.cgi" method="post" target="_blank"> _HTML_TAG_ #// Automatically calculates the editor base path based on the _samples directory. #// This is usefull only for these samples. A real application should use something like this: #// $oFCKeditor->BasePath = '/fckeditor/' ; // '/fckeditor/' is the default value. $sBasePath = $ServerPath; $sBasePath = substr( $sBasePath, 0, index($sBasePath,"_samples")); &FCKeditor('FCKeditor1'); $BasePath = $sBasePath; if($FORM{'Lang'} ne "") { $Config{'AutoDetectLanguage'} = "false"; $lang = $FORM{'Lang'}; $lang =~ s/[^a-z\-]//ig; $Config{'DefaultLanguage'} = $lang; } else { $Config{'AutoDetectLanguage'} = "true"; $Config{'DefaultLanguage'} = 'en' ; } $Value = '<p>This is some <strong>sample text</strong>. You are using <a href="http://www.fckeditor.net/">FCKeditor</a>.</p>' ; &Create(); print <<"_HTML_TAG_"; <br> <input type="submit" value="Submit"> </form> </body> </html> _HTML_TAG_ ################ #Please use this function, rewriting it depending on a server's environment. ################ sub GetServerPath { my $dir; if($DefServerPath) { $dir = $DefServerPath; } else { if($ENV{'PATH_INFO'}) { $dir = $ENV{'PATH_INFO'}; } elsif($ENV{'FILEPATH_INFO'}) { $dir = $ENV{'FILEPATH_INFO'}; } elsif($ENV{'REQUEST_URI'}) { $dir = $ENV{'REQUEST_URI'}; } } return($dir); }
10npsite
trunk/guanli/system/fckeditor/_samples/perl/sample02.cgi
Perl
asf20
5,053
#!/usr/bin/env perl ##### # FCKeditor - The text editor for Internet - http://www.fckeditor.net # Copyright (C) 2003-2009 Frederico Caldeira Knabben # # == BEGIN LICENSE == # # Licensed under the terms of any of the following licenses at your # choice: # # - GNU General Public License Version 2 or later (the "GPL") # http://www.gnu.org/licenses/gpl.html # # - GNU Lesser General Public License Version 2.1 or later (the "LGPL") # http://www.gnu.org/licenses/lgpl.html # # - Mozilla Public License Version 1.1 or later (the "MPL") # http://www.mozilla.org/MPL/MPL-1.1.html # # == END LICENSE == # # Sample page. ##### ## START: Hack for Windows (Not important to understand the editor code... Perl specific). if(Windows_check()) { chdir(GetScriptPath($0)); } sub Windows_check { # IIS,PWS(NT/95) $www_server_os = $^O; # Win98 & NT(SP4) if($www_server_os eq "") { $www_server_os= $ENV{'OS'}; } # AnHTTPd/Omni/IIS if($ENV{'SERVER_SOFTWARE'} =~ /AnWeb|Omni|IIS\//i) { $www_server_os= 'win'; } # Win Apache if($ENV{'WINDIR'} ne "") { $www_server_os= 'win'; } if($www_server_os=~ /win/i) { return(1); } return(0); } sub GetScriptPath { local($path) = @_; if($path =~ /[\:\/\\]/) { $path =~ s/(.*?)[\/\\][^\/\\]+$/$1/; } else { $path = '.'; } $path; } ## END: Hack for IIS require '../../fckeditor.pl'; # When $ENV{'PATH_INFO'} cannot be used by perl. # $DefRootPath = "/XXXXX/_samples/perl/sample04.cgi"; Please write in script. my $DefServerPath = ""; my $ServerPath; $ServerPath = &GetServerPath(); if($ENV{'REQUEST_METHOD'} eq "POST") { read(STDIN, $buffer, $ENV{'CONTENT_LENGTH'}); } else { $buffer = $ENV{'QUERY_STRING'}; } @pairs = split(/&/,$buffer); foreach $pair (@pairs) { ($name,$value) = split(/=/,$pair); $value =~ tr/+/ /; $value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg; $value =~ s/\t//g; $value =~ s/\r\n/\n/g; $FORM{$name} .= "\0" if(defined($FORM{$name})); $FORM{$name} .= $value; } #!!Caution javascript \ Quart print "Content-type: text/html\n\n"; print <<"_HTML_TAG_"; <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html> <head> <title>FCKeditor - Sample</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <meta name="robots" content="noindex, nofollow"> <link href="../sample.css" rel="stylesheet" type="text/css" /> <script type="text/javascript"> function FCKeditor_OnComplete( editorInstance ) { var oCombo = document.getElementById( 'cmbSkins' ) ; // Get the active skin. var sSkin = editorInstance.Config['SkinPath'] ; sSkin = sSkin.match(/[^\\/]+(?=\\/\$)/g) ; oCombo.value = sSkin ; oCombo.style.visibility = '' ; } function ChangeSkin( skinName ) { window.location.href = window.location.pathname + "?Skin=" + skinName ; } </script> </head> <body> <h1>FCKeditor - Perl - Sample 4</h1> This sample shows how to change the editor skin. <hr> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td> Select the skin to load:&nbsp; </td> <td> <select id="cmbSkins" onchange="ChangeSkin(this.value);" style="VISIBILITY: hidden"> <option value="default" selected>Default</option> <option value="office2003">Office 2003</option> <option value="silver">Silver</option> </select> </td> </tr> </table> <br> <form action="sampleposteddata.cgi" method="post" target="_blank"> _HTML_TAG_ #// Automatically calculates the editor base path based on the _samples directory. #// This is usefull only for these samples. A real application should use something like this: #// $oFCKeditor->BasePath = '/fckeditor/' ; // '/fckeditor/' is the default value. $sBasePath = $ServerPath; $sBasePath = substr( $sBasePath, 0, index( $sBasePath, "_samples" ) ) ; &FCKeditor('FCKeditor1'); $BasePath = $sBasePath; if($FORM{'Skin'} ne "") { $skin = $FORM{'Skin'}; $skin =~ s/[^a-z0-9]//ig; $Config{'SkinPath'} = $sBasePath . 'editor/skins/' . $skin . '/' ; } $Value = '<p>This is some <strong>sample text</strong>. You are using <a href="http://www.fckeditor.net/">FCKeditor</a>.</p>' ; &Create() ; print <<"_HTML_TAG_"; <br> <input type="submit" value="Submit"> </form> </body> </html> _HTML_TAG_ ################ #Please use this function, rewriting it depending on a server's environment. ################ sub GetServerPath { my $dir; if($DefServerPath) { $dir = $DefServerPath; } else { if($ENV{'PATH_INFO'}) { $dir = $ENV{'PATH_INFO'}; } elsif($ENV{'FILEPATH_INFO'}) { $dir = $ENV{'FILEPATH_INFO'}; } elsif($ENV{'REQUEST_URI'}) { $dir = $ENV{'REQUEST_URI'}; } } return($dir); }
10npsite
trunk/guanli/system/fckeditor/_samples/perl/sample04.cgi
Perl
asf20
4,846