芝麻web文件管理V1.00
编辑当前文件:/home/krishnamexports/www/panel/fckeditor/fckeditor.cfc
#CreateHtml()#
// display the html editor or a plain textarea? if( isCompatible() ) return getHtmlEditor(); else return getTextArea();
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();
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 = "
#HTMLEditFormat(this.value)#</textarea>" & chr(13) & chr(10);
// 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 & "&Toolbar=" & this.toolbarSet;
result = result & "
" & chr(13) & chr(10); result = result & "
" & chr(13) & chr(10); result = result & "
" & chr(13) & chr(10);
/** * 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 & "&"; 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;