if( attributes.checkBrowser ) { isCompatibleBrowser = FCKeditor_IsCompatibleBrowser(); } else { // If we should not check browser compatibility, assume true isCompatibleBrowser = true; } // try to fix the basePath, if ending slash is missing if( len( attributes.basePath) and right( attributes.basePath, 1 ) is not "/" ) attributes.basePath = attributes.basePath & "/"; // construct the url sURL = attributes.basePath & "editor/fckeditor.html?InstanceName=" & attributes.instanceName; // append toolbarset name to the url if( len( attributes.toolbarSet ) ) sURL = sURL & "&Toolbar=" & attributes.toolbarSet; // create configuration string: Key1=Value1&Key2=Value2&... (Key/Value:HTML encoded) /** * 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 = 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"; sConfig = ""; for( key in attributes.config ) { iPos = listFindNoCase( lConfigKeys, key ); if( iPos GT 0 ) { if( len( sConfig ) ) sConfig = sConfig & "&"; fieldValue = attributes.config[key]; fieldName = listGetAt( lConfigKeys, iPos ); sConfig = sConfig & urlEncodedFormat( fieldName ) & '=' & urlEncodedFormat( fieldValue ); } } // append unit "px" for numeric width and/or height values if( isNumeric( attributes.width ) ) attributes.width = attributes.width & "px"; if( isNumeric( attributes.height ) ) attributes.height = attributes.height & "px";