Index: trunk/admin/editor/cmseditor/editor/_source/internals/fck_2.js =================================================================== diff -u -r1748 -r1999 --- trunk/admin/editor/cmseditor/editor/_source/internals/fck_2.js (.../fck_2.js) (revision 1748) +++ trunk/admin/editor/cmseditor/editor/_source/internals/fck_2.js (.../fck_2.js) (revision 1999) @@ -22,6 +22,7 @@ // This collection is used by the browser specific implementations to tell // wich named commands must be handled separately. FCK.RedirectNamedCommands = new Object() ; +var oWindow = new Object() ; FCK.ExecuteNamedCommand = function( commandName, commandParameter ) { @@ -161,7 +162,7 @@ { if (typeof(FCKConfig.template_name) != 'undefined' && FCKConfig.template_name != '') { - oWindow = window.open(FCKConfig.project_path+'index.php?t='+FCKConfig.template_name, 'prewiev', 'toolbar=yes,location=yes,status=yes,menubar=yes,scrollbars=yes,resizable=yes') ; + oWindow = window.open(FCKConfig.ProjectPath+'/index.php?t='+FCKConfig.template_name, 'prewiev', 'toolbar=yes,location=yes,status=yes,menubar=yes,scrollbars=yes,resizable=yes') ; if ( FCKBrowserInfo.IsIE ) { oWindow.attachEvent( "onload", FCK.SetPreview ) ; } @@ -170,10 +171,13 @@ return ; } else { + if (typeof(FCKConfig.preview_width) != 'undefined' && typeof(FCKConfig.preview_height) != 'undefined' && FCKConfig.preview_width > 0 && FCKConfig.preview_height > 0) + var oWindowE = window.open( '', null, 'toolbar=yes,location=yes,status=yes,menubar=yes,scrollbars=yes,resizable=yes,width='+FCKConfig.preview_width+',height='+FCKConfig.preview_height ) ; + else var oWindowE = window.open( '', null, 'toolbar=yes,location=yes,status=yes,menubar=yes,scrollbars=yes,resizable=yes' ) ; - var sHTML = '' + FCK.GetHTML() + '' ; - oWindowE.document.write( sHTML ); - oWindowE.document.close(); + var sHTML = '' + FCK.GetHTML() + '' ; + oWindowE.document.write( sHTML ); + oWindowE.document.close(); } } @@ -204,7 +208,8 @@ // Update the toolbar. FCKToolbarSet.RefreshModeState() ; - + if (typeof(FCKConfig.newBgColor) != 'undefined') + FCK.EditorDocument.bgColor = FCKConfig.newBgColor; // Set the Focus. FCK.Focus() ; } Index: trunk/admin/editor/cmseditor/editor/_source/internals/fck_1.js =================================================================== diff -u -r1415 -r1999 --- trunk/admin/editor/cmseditor/editor/_source/internals/fck_1.js (.../fck_1.js) (revision 1415) +++ trunk/admin/editor/cmseditor/editor/_source/internals/fck_1.js (.../fck_1.js) (revision 1999) @@ -42,8 +42,8 @@ // Attach the editor to the form onsubmit event FCKTools.AttachToLinkedFieldFormSubmit( this.UpdateLinkedField ) ; - this.SetStatus( FCK_STATUS_ACTIVE ) ; + } FCK.SetStatus = function( newStatus ) @@ -121,7 +121,8 @@ this.Events.FireEvent( 'OnStatusChange', newStatus ) ; if ( this.OnStatusChange ) this.OnStatusChange( newStatus ) ; - + if (typeof(FCKConfig.newBgColor) != 'undefined') + this.EditorDocument.bgColor = FCKConfig.newBgColor; } FCK.GetHTML = function( format ) Index: trunk/admin/editor/cmseditor/editor/_source/commandclasses/fck_othercommands.js =================================================================== diff -u -r1415 -r1999 --- trunk/admin/editor/cmseditor/editor/_source/commandclasses/fck_othercommands.js (.../fck_othercommands.js) (revision 1415) +++ trunk/admin/editor/cmseditor/editor/_source/commandclasses/fck_othercommands.js (.../fck_othercommands.js) (revision 1999) @@ -170,6 +170,8 @@ FCKNewPageCommand.prototype.Execute = function() { FCK.SetHTML( FCKBrowserInfo.IsGecko ? ' ' : '' ) ; + if (typeof(FCKConfig.newBgColor) != 'undefined') + FCK.EditorDocument.bgColor = FCKConfig.newBgColor; } FCKNewPageCommand.prototype.GetState = function() Index: trunk/admin/editor/cmseditor/editor/_source/internals/fck.js =================================================================== diff -u -r1415 -r1999 --- trunk/admin/editor/cmseditor/editor/_source/internals/fck.js (.../fck.js) (revision 1415) +++ trunk/admin/editor/cmseditor/editor/_source/internals/fck.js (.../fck.js) (revision 1999) @@ -31,5 +31,6 @@ // First try to get the Linked field using its ID. FCK.LinkedField = window.parent.document.getElementById( FCK.Name ) ; // If no linked field is available with that ID, try with the "Name". + if ( !FCK.LinkedField ) FCK.LinkedField = window.parent.document.getElementsByName( FCK.Name )[0] ; Index: trunk/admin/editor/cmseditor/editor/filemanager/browser/default/connectors/php/commands.php =================================================================== diff -u -r1974 -r1999 --- trunk/admin/editor/cmseditor/editor/filemanager/browser/default/connectors/php/commands.php (.../commands.php) (revision 1974) +++ trunk/admin/editor/cmseditor/editor/filemanager/browser/default/connectors/php/commands.php (.../commands.php) (revision 1999) @@ -114,6 +114,13 @@ $email_templates_folder_id = $rs->fields['value']; } + $query = "SELECT value FROM config WHERE name = 'custom_cms'"; + $rs = $conn->Execute($query); + if ($rs && !$rs->EOF) + { + $custom_cms = $rs->fields['value']; + } + if ( $email_templates_folder_id == "" ) $email_templates_folder_id = 0; @@ -130,8 +137,10 @@ live_blocks AS lb ON (st.st_id = lb.template_id) AND (lb.block_type = 3) - WHERE - st.st_parent_id = ".$st_id." AND st_id != ".$email_templates_folder_id." AND st_path != '/cms' + WHERE st.st_parent_id = ".$st_id." + AND st_id != ".$email_templates_folder_id." + AND st_path != '/cms' + AND st_name NOT IN (".$custom_cms.") ORDER BY st.st_order"; } else { @@ -148,7 +157,10 @@ ON (st.st_id = wb.template_id) AND (wb.block_type = 3) WHERE - st.st_parent_id = ".$st_id." AND st_id != ".$email_templates_folder_id." AND st_path != '/cms%' + st.st_parent_id = ".$st_id." + AND st_id != ".$email_templates_folder_id." + AND st_path != '/cms%' + AND st_name NOT IN (".$custom_cms.") ORDER BY st.st_order"; } Index: trunk/admin/editor/cmseditor/editor/_source/internals/fck_onload.js =================================================================== diff -u -r1415 -r1999 --- trunk/admin/editor/cmseditor/editor/_source/internals/fck_onload.js (.../fck_onload.js) (revision 1415) +++ trunk/admin/editor/cmseditor/editor/_source/internals/fck_onload.js (.../fck_onload.js) (revision 1999) @@ -65,7 +65,6 @@ // Load the styles for the configured skin. LoadStyles() ; } - // First of all load the configuration file. FCKScriptLoader.AddScript( '../fckconfig.js' ) ; } @@ -109,6 +108,7 @@ else FCKScriptLoader.AddScript( 'js/fckeditorcode_gecko_1.js' ) ; @Packager.Compactor.RemoveLine */ + } function LoadLanguageFile() Index: trunk/admin/editor/cmseditor/editor/js/fckeditorcode_ie_2.js =================================================================== diff -u -r1748 -r1999 --- trunk/admin/editor/cmseditor/editor/js/fckeditorcode_ie_2.js (.../fckeditorcode_ie_2.js) (revision 1748) +++ trunk/admin/editor/cmseditor/editor/js/fckeditorcode_ie_2.js (.../fckeditorcode_ie_2.js) (revision 1999) @@ -10,7 +10,7 @@ * * This file has been compacted for best loading performance. */ -FCK.RedirectNamedCommands=new Object();FCK.ExecuteNamedCommand=function(commandName,commandParameter){if (FCK.RedirectNamedCommands[commandName]!=null) {FCK.ExecuteRedirectedNamedCommand(commandName,commandParameter);}else{FCK.Focus();if (commandName=="Undo"){if (confirm("This will delete everything on this page. Are you sure?")) FCK.EditorDocument.execCommand(commandName,false,commandParameter);} else FCK.EditorDocument.execCommand(commandName,false,commandParameter);FCK.Events.FireEvent('OnSelectionChange');};};FCK.GetNamedCommandState=function(commandName){try{if (commandName=='InsertHorizontalRule') return FCK_TRISTATE_OFF;if (!FCK.EditorDocument.queryCommandEnabled(commandName)) return FCK_TRISTATE_DISABLED;else {switch (commandName){default:return FCK.EditorDocument.queryCommandState(commandName)?FCK_TRISTATE_ON:FCK_TRISTATE_OFF;};};}catch (e){return FCK_TRISTATE_OFF;};};FCK.GetNamedCommandValue=function(commandName){var sValue='';var eState=FCK.GetNamedCommandState(commandName);if (eState==FCK_TRISTATE_DISABLED) return null;try{sValue=this.EditorDocument.queryCommandValue(commandName);}catch(e) {};return sValue?sValue:'';};FCK.CleanAndPaste=function(html){html=html.replace(/<\/?SPAN[^>]*>/gi,"");html=html.replace(/<(\w[^>]*) class=([^ |>]*)([^>]*)/gi,"<$1$3");html=html.replace(/<(\w[^>]*) style="([^"]*)"([^>]*)/gi,"<$1$3");html=html.replace(/<(\w[^>]*) lang=([^ |>]*)([^>]*)/gi,"<$1$3");html=html.replace(/<\\?\?xml[^>]*>/gi,"");html=html.replace(/<\/?\w+:[^>]*>/gi,"");html=html.replace(/ /," ");var re=new RegExp("(]*>.*?)(<\/P>)","gi");html=html.replace(re,"");FCK.InsertHtml(html);};FCK.Preview=function(){if (typeof(FCKConfig.template_name)!='undefined'&&FCKConfig.template_name!=''){oWindow=window.open(FCKConfig.project_path+'index.php?t='+FCKConfig.template_name,'prewiev','toolbar=yes,location=yes,status=yes,menubar=yes,scrollbars=yes,resizable=yes');if (FCKBrowserInfo.IsIE) {oWindow.attachEvent("onload",FCK.SetPreview);}else oWindow.addEventListener('load',FCK.SetPreview,true);return;}else {var oWindowE=window.open('',null,'toolbar=yes,location=yes,status=yes,menubar=yes,scrollbars=yes,resizable=yes');var sHTML=''+FCK.GetHTML()+'';oWindowE.document.write(sHTML);oWindowE.document.close();};};FCK.SetPreview=function(){oWindow.document.getElementById('block_'+FCKConfig.block_id).innerHTML=FCK.GetHTML();};FCK.SwitchEditMode=function(){var bWYSIWYG=(FCK.EditMode==FCK_EDITMODE_WYSIWYG);document.getElementById('eWysiwyg').style.display=bWYSIWYG?'none':'';document.getElementById('eSource').style.display=bWYSIWYG?'':'none';if (bWYSIWYG) document.getElementById('eSourceField').value=(FCKConfig.EnableXHTML&&FCKConfig.EnableSourceXHTML?FCK.GetXHTML(FCKConfig.FormatSource):FCK.GetHTML(FCKConfig.FormatSource));else FCK.SetHTML(FCK.GetHTML(),true);FCK.EditMode=bWYSIWYG?FCK_EDITMODE_SOURCE:FCK_EDITMODE_WYSIWYG;FCKToolbarSet.RefreshModeState();FCK.Focus();};FCK.CreateElement=function(tag){var e=FCK.EditorDocument.createElement(tag);return FCK.InsertElementAndGetIt(e);};FCK.InsertElementAndGetIt=function(e){e.setAttribute('__FCKTempLabel',1);this.InsertElement(e);var aEls=FCK.EditorDocument.getElementsByTagName(e.tagName);for (var i=0;i]*>/gi,"");html=html.replace(/<(\w[^>]*) class=([^ |>]*)([^>]*)/gi,"<$1$3");html=html.replace(/<(\w[^>]*) style="([^"]*)"([^>]*)/gi,"<$1$3");html=html.replace(/<(\w[^>]*) lang=([^ |>]*)([^>]*)/gi,"<$1$3");html=html.replace(/<\\?\?xml[^>]*>/gi,"");html=html.replace(/<\/?\w+:[^>]*>/gi,"");html=html.replace(/ /," ");var re=new RegExp("(]*>.*?)(<\/P>)","gi");html=html.replace(re,"");FCK.InsertHtml(html);};FCK.Preview=function(){if (typeof(FCKConfig.template_name)!='undefined'&&FCKConfig.template_name!=''){oWindow=window.open(FCKConfig.ProjectPath+'/index.php?t='+FCKConfig.template_name,'prewiev','toolbar=yes,location=yes,status=yes,menubar=yes,scrollbars=yes,resizable=yes');if (FCKBrowserInfo.IsIE) {oWindow.attachEvent("onload",FCK.SetPreview);}else oWindow.addEventListener('load',FCK.SetPreview,true);return;}else {if (typeof(FCKConfig.preview_width)!='undefined'&&typeof(FCKConfig.preview_height)!='undefined'&&FCKConfig.preview_width>0&&FCKConfig.preview_height>0) var oWindowE=window.open('',null,'toolbar=yes,location=yes,status=yes,menubar=yes,scrollbars=yes,resizable=yes,width='+FCKConfig.preview_width+',height='+FCKConfig.preview_height);else var oWindowE=window.open('',null,'toolbar=yes,location=yes,status=yes,menubar=yes,scrollbars=yes,resizable=yes');var sHTML=''+FCK.GetHTML()+'';oWindowE.document.write(sHTML);oWindowE.document.close();};};FCK.SetPreview=function(){oWindow.document.getElementById('block_'+FCKConfig.block_id).innerHTML=FCK.GetHTML();};FCK.SwitchEditMode=function(){var bWYSIWYG=(FCK.EditMode==FCK_EDITMODE_WYSIWYG);document.getElementById('eWysiwyg').style.display=bWYSIWYG?'none':'';document.getElementById('eSource').style.display=bWYSIWYG?'':'none';if (bWYSIWYG) document.getElementById('eSourceField').value=(FCKConfig.EnableXHTML&&FCKConfig.EnableSourceXHTML?FCK.GetXHTML(FCKConfig.FormatSource):FCK.GetHTML(FCKConfig.FormatSource));else FCK.SetHTML(FCK.GetHTML(),true);FCK.EditMode=bWYSIWYG?FCK_EDITMODE_SOURCE:FCK_EDITMODE_WYSIWYG;FCKToolbarSet.RefreshModeState();if (typeof(FCKConfig.newBgColor)!='undefined') FCK.EditorDocument.bgColor=FCKConfig.newBgColor;FCK.Focus();};FCK.CreateElement=function(tag){var e=FCK.EditorDocument.createElement(tag);return FCK.InsertElementAndGetIt(e);};FCK.InsertElementAndGetIt=function(e){e.setAttribute('__FCKTempLabel',1);this.InsertElement(e);var aEls=FCK.EditorDocument.getElementsByTagName(e.tagName);for (var i=0;i]* class="?MsoNormal"?/gi;if (re.test(sHTML)){if (confirm(FCKLang["PasteWordConfirm"])){FCK.CleanAndPaste(sHTML);return false;};};}else return true;};FCK.PasteAsPlainText=function(){var sText=FCKTools.HTMLEncode(clipboardData.getData("Text"));sText=sText.replace(/\n/g,'
');this.InsertHtml(sText);};FCK.PasteFromWord=function(){FCK.CleanAndPaste(FCK.GetClipboardHTML());};FCK.InsertElement=function(element){FCK.InsertHtml(element.outerHTML);};FCK.GetClipboardHTML=function(){var oDiv=document.getElementById('___FCKHiddenDiv');if (!oDiv){var oDiv=document.createElement('DIV');oDiv.id='___FCKHiddenDiv';oDiv.style.visibility='hidden';oDiv.style.overflow='hidden';oDiv.style.position='absolute';oDiv.style.width=1;oDiv.style.height=1;document.body.appendChild(oDiv);};oDiv.innerHTML='';var oTextRange=document.body.createTextRange();oTextRange.moveToElementText(oDiv);oTextRange.execCommand('Paste');var sData=oDiv.innerHTML;oDiv.innerHTML='';return sData;};FCK.AttachToOnSelectionChange=function(functionPointer){this.Events.AttachEvent('OnSelectionChange',functionPointer);};FCK.CreateLink=function(url){FCK.ExecuteNamedCommand('Unlink');if (url.length>0){var sTempUrl='javascript:void(0);/*'+(new Date().getTime())+'*/';FCK.ExecuteNamedCommand('CreateLink',sTempUrl);var oLinks=this.EditorDocument.links;for (i=0;i');else FCK.ExecuteNamedCommand('FormatBlock','<'+formatName+'>');};FCKFormatBlockCommand.prototype.GetState=function(){return FCK.GetNamedCommandValue('FormatBlock');};var FCKPreviewCommand=function(){this.Name='Preview';};FCKPreviewCommand.prototype.Execute=function(){FCK.Preview();};FCKPreviewCommand.prototype.GetState=function(){return FCK_TRISTATE_OFF;};var FCKSaveCommand=function(){this.Name='Save';};FCKSaveCommand.prototype.Execute=function(){var oForm=FCK.LinkedField.form;oForm.submit();};FCKSaveCommand.prototype.GetState=function(){return FCK_TRISTATE_OFF;};var FCKNewPageCommand=function(){this.Name='NewPage';};FCKNewPageCommand.prototype.Execute=function(){FCK.SetHTML(FCKBrowserInfo.IsGecko?' ':'');};FCKNewPageCommand.prototype.GetState=function(){return FCK_TRISTATE_OFF;};var FCKSourceCommand=function(){this.Name='Source';};FCKSourceCommand.prototype.Execute=function(){FCK.SwitchEditMode();};FCKSourceCommand.prototype.GetState=function(){return (FCK.EditMode==FCK_EDITMODE_WYSIWYG?FCK_TRISTATE_OFF:FCK_TRISTATE_ON);} +var FCKDialogCommand=function(name,title,url,width,height,getStateFunction,getStateParam){this.Name=name;this.Title=title;this.Url=url;this.Width=width;this.Height=height;this.GetStateFunction=getStateFunction;this.GetStateParam=getStateParam;};FCKDialogCommand.prototype.Execute=function(){FCKDialog.OpenDialog('FCKDialog_'+this.Name,this.Title,this.Url,this.Width,this.Height);};FCKDialogCommand.prototype.GetState=function(){if (this.GetStateFunction) return this.GetStateFunction(this.GetStateParam);else return FCK_TRISTATE_OFF;};var FCKUndefinedCommand=function(){this.Name='Undefined';};FCKUndefinedCommand.prototype.Execute=function(){alert(FCKLang.NotImplemented);};FCKUndefinedCommand.prototype.GetState=function(){return FCK_TRISTATE_OFF;};var FCKFontNameCommand=function(){this.Name='FontName';};FCKFontNameCommand.prototype.Execute=function(fontName){if (fontName==null||fontName==""){}else FCK.ExecuteNamedCommand('FontName',fontName);};FCKFontNameCommand.prototype.GetState=function(){return FCK.GetNamedCommandValue('FontName');};var FCKFontSizeCommand=function(){this.Name='FontSize';};FCKFontSizeCommand.prototype.Execute=function(fontSize){if (typeof(fontSize)=='string') fontSize=parseInt(fontSize);if (fontSize==null||fontSize==''){FCK.ExecuteNamedCommand('FontSize',3);}else FCK.ExecuteNamedCommand('FontSize',fontSize);};FCKFontSizeCommand.prototype.GetState=function(){return FCK.GetNamedCommandValue('FontSize');};var FCKFormatBlockCommand=function(){this.Name='FormatBlock';};FCKFormatBlockCommand.prototype.Execute=function(formatName){if (formatName==null||formatName=='') FCK.ExecuteNamedCommand('FormatBlock','

');else FCK.ExecuteNamedCommand('FormatBlock','<'+formatName+'>');};FCKFormatBlockCommand.prototype.GetState=function(){return FCK.GetNamedCommandValue('FormatBlock');};var FCKPreviewCommand=function(){this.Name='Preview';};FCKPreviewCommand.prototype.Execute=function(){FCK.Preview();};FCKPreviewCommand.prototype.GetState=function(){return FCK_TRISTATE_OFF;};var FCKSaveCommand=function(){this.Name='Save';};FCKSaveCommand.prototype.Execute=function(){var oForm=FCK.LinkedField.form;oForm.submit();};FCKSaveCommand.prototype.GetState=function(){return FCK_TRISTATE_OFF;};var FCKNewPageCommand=function(){this.Name='NewPage';};FCKNewPageCommand.prototype.Execute=function(){FCK.SetHTML(FCKBrowserInfo.IsGecko?' ':'');if (typeof(FCKConfig.newBgColor)!='undefined') FCK.EditorDocument.bgColor=FCKConfig.newBgColor;};FCKNewPageCommand.prototype.GetState=function(){return FCK_TRISTATE_OFF;};var FCKSourceCommand=function(){this.Name='Source';};FCKSourceCommand.prototype.Execute=function(){FCK.SwitchEditMode();};FCKSourceCommand.prototype.GetState=function(){return (FCK.EditMode==FCK_EDITMODE_WYSIWYG?FCK_TRISTATE_OFF:FCK_TRISTATE_ON);} var FCKSpellCheckCommand=function(){this.Name='SpellCheck';this.IsEnabled=(FCKConfig.SpellChecker=='ieSpell'||FCKConfig.SpellChecker=='SpellerPages');};FCKSpellCheckCommand.prototype.Execute=function(){switch (FCKConfig.SpellChecker){case 'ieSpell':this._RunIeSpell();break;case 'SpellerPages':FCKDialog.OpenDialog('FCKDialog_SpellCheck','Spell Check','dialog/fck_spellerpages.html',440,480);break;};};FCKSpellCheckCommand.prototype._RunIeSpell=function(){try{var oIeSpell=new ActiveXObject("ieSpell.ieSpellExtension");oIeSpell.CheckAllLinkedDocuments(FCK.EditorDocument);}catch(e){if(e.number==-2146827859){if (confirm(FCKLang.IeSpellDownload)) window.open(FCKConfig.IeSpellDownloadUrl,'IeSpellDownload');}else alert('Error Loading ieSpell: '+e.message+' ('+e.number+')');};};FCKSpellCheckCommand.prototype.GetState=function(){return this.IsEnabled?FCK_TRISTATE_OFF:FCK_TRISTATE_DISABLED;} var FCKTextColorCommand=function(type){this.Name=type=='ForeColor'?'TextColor':'BGColor';this.Type=type;this._Panel=new FCKPanel();this._Panel.StyleSheet=FCKConfig.SkinPath+'fck_contextmenu.css';this._Panel.Create();this._CreatePanelBody(this._Panel.Document,this._Panel.PanelDiv);};FCKTextColorCommand.prototype.Execute=function(panelX,panelY,relElement){FCK._ActiveColorPanelType=this.Type;this._Panel.Show(panelX,panelY,relElement);};FCKTextColorCommand.prototype.SetColor=function(color){if (FCK._ActiveColorPanelType=='ForeColor') FCK.ExecuteNamedCommand('ForeColor',color);else if (FCKBrowserInfo.IsGecko) FCK.ExecuteNamedCommand('hilitecolor',color);else FCK.ExecuteNamedCommand('BackColor',color);delete FCK._ActiveColorPanelType;};FCKTextColorCommand.prototype.GetState=function(){return FCK_TRISTATE_OFF;};FCKTextColorCommand.prototype._CreatePanelBody=function(targetDocument,targetDiv){function CreateSelectionDiv(){var oDiv=targetDocument.createElement("DIV");oDiv.className='ColorDeselected';oDiv.onmouseover=function() { this.className='ColorSelected';};oDiv.onmouseout=function() { this.className='ColorDeselected';};return oDiv;};var oTable=targetDiv.appendChild(targetDocument.createElement("TABLE"));oTable.style.tableLayout='fixed';oTable.cellPadding=0;oTable.cellSpacing=0;oTable.border=0;oTable.width=150;var oCell=oTable.insertRow(-1).insertCell(-1);oCell.colSpan=8;var oDiv=oCell.appendChild(CreateSelectionDiv());oDiv.innerHTML='\ \ \ \ \
'+FCKLang.ColorAutomatic+'
';oDiv.Command=this;oDiv.onclick=function(){this.className='ColorDeselected';this.Command.SetColor('');this.Command._Panel.Hide();};var aColors=FCKConfig.FontColors.split(',');var iCounter=0;while (iCounter

';oDiv.Command=this;oDiv.onclick=function(){this.className='ColorDeselected';this.Command.SetColor('#'+this.Color);this.Command._Panel.Hide();};};};var oCell=oTable.insertRow(-1).insertCell(-1);oCell.colSpan=8;var oDiv=oCell.appendChild(CreateSelectionDiv());oDiv.innerHTML='
'+FCKLang.ColorMoreColors+'
';oDiv.Command=this;oDiv.onclick=function(){this.className='ColorDeselected';this.Command._Panel.Hide();FCKDialog.OpenDialog('FCKDialog_Color',FCKLang.DlgColorTitle,'dialog/fck_colorselector.html',400,330,this.Command.SetColor);};} var FCKPastePlainTextCommand=function(){this.Name='PasteText';};FCKPastePlainTextCommand.prototype.Execute=function(){FCK.PasteAsPlainText();};FCKPastePlainTextCommand.prototype.GetState=function(){return FCK.GetNamedCommandState('Paste');}; Index: trunk/admin/editor/cmseditor/editor/js/fckeditorcode_ie_1.js =================================================================== diff -u -r1975 -r1999 --- trunk/admin/editor/cmseditor/editor/js/fckeditorcode_ie_1.js (.../fckeditorcode_ie_1.js) (revision 1975) +++ trunk/admin/editor/cmseditor/editor/js/fckeditorcode_ie_1.js (.../fckeditorcode_ie_1.js) (revision 1999) @@ -21,5 +21,5 @@ FCKXHtml._GetMainXmlString=function(){return this.MainNode.xml;};FCKXHtml._AppendEntity=function(xmlNode,entity){xmlNode.appendChild(this.XML.createEntityReference(entity));};FCKXHtml._AppendAttributes=function(xmlNode,htmlNode,node,nodeName){var aAttributes=htmlNode.attributes;for (var n=0;n0) FCKXHtml._AppendAttribute(node,'shape',sCoords);};return node;};FCKXHtml.TagProcessors['label']=function(node,htmlNode){if (htmlNode.htmlFor.length>0) FCKXHtml._AppendAttribute(node,'for',htmlNode.htmlFor);FCKXHtml._AppendChildNodes(node,htmlNode);return node;};FCKXHtml.TagProcessors['form']=function(node,htmlNode){if (htmlNode.acceptCharset.length>0&&htmlNode.acceptCharset!='UNKNOWN') FCKXHtml._AppendAttribute(node,'accept-charset',htmlNode.acceptCharset);FCKXHtml._AppendChildNodes(node,htmlNode);return node;} var FCKCodeFormatter=new Object();FCKCodeFormatter.Regex=new Object();FCKCodeFormatter.Regex.BlocksOpener=/\<(P|DIV|H1|H2|H3|H4|H5|H6|ADDRESS|PRE|OL|UL|LI|TITLE|META|LINK|BASE|SCRIPT|LINK|TD|AREA|OPTION)[^\>]*\>/gi;FCKCodeFormatter.Regex.BlocksCloser=/\<\/(P|DIV|H1|H2|H3|H4|H5|H6|ADDRESS|PRE|OL|UL|LI|TITLE|META|LINK|BASE|SCRIPT|LINK|TD|AREA|OPTION)[^\>]*\>/gi;FCKCodeFormatter.Regex.NewLineTags=/\<(BR|HR)[^\>]\>/gi;FCKCodeFormatter.Regex.MainTags=/\<\/?(HTML|HEAD|BODY|FORM|TABLE|TBODY|THEAD|TR)[^\>]*\>/gi;FCKCodeFormatter.Regex.LineSplitter=/\s*\n+\s*/g;FCKCodeFormatter.Regex.IncreaseIndent=/^\<(HTML|HEAD|BODY|FORM|TABLE|TBODY|THEAD|TR|UL|OL)[ \/\>]/i;FCKCodeFormatter.Regex.DecreaseIndent=/^\<\/(HTML|HEAD|BODY|FORM|TABLE|TBODY|THEAD|TR|UL|OL)[ \>]/i;FCKCodeFormatter.Regex.FormatIndentatorRemove=new RegExp(FCKConfig.FormatIndentator);FCKCodeFormatter.Format=function(html){var sFormatted=html.replace(this.Regex.BlocksOpener,'\n$&');;sFormatted=sFormatted.replace(this.Regex.BlocksCloser,'$&\n');sFormatted=sFormatted.replace(this.Regex.NewLineTags,'$&\n');sFormatted=sFormatted.replace(this.Regex.MainTags,'\n$&\n');var sIndentation='';var asLines=sFormatted.split(this.Regex.LineSplitter);sFormatted='';for (var i=0;i=0&&sHtml==FCKUndo.SavedData[FCKUndo.CurrentIndex][0]) return;if (FCKUndo.CurrentIndex+1>=FCKConfig.MaxUndoLevels) FCKUndo.SavedData.shift();else FCKUndo.CurrentIndex++;var sBookmark;if (FCK.EditorDocument.selection.type=='Text') sBookmark=FCK.EditorDocument.selection.createRange().getBookmark();FCKUndo.SavedData[FCKUndo.CurrentIndex]=[sHtml,sBookmark];FCK.Events.FireEvent("OnSelectionChange");};FCKUndo.Undo=function(){if (FCKUndo.CurrentIndex>0){if (FCKUndo.CurrentIndex==(FCKUndo.SavedData.length-1)){FCKUndo.SaveUndoStep();};FCKUndo._ApplyUndoLevel(--FCKUndo.CurrentIndex);FCK.Events.FireEvent("OnSelectionChange");};};FCKUndo.Redo=function(){if (FCKUndo.CurrentIndex<(FCKUndo.SavedData.length-1)){FCKUndo._ApplyUndoLevel(++FCKUndo.CurrentIndex);FCK.Events.FireEvent("OnSelectionChange");};};FCKUndo._ApplyUndoLevel=function(level){var oData=FCKUndo.SavedData[level];FCK.EditorDocument.body.innerHTML=oData[0];if (oData[1]){var oRange=FCK.EditorDocument.selection.createRange();oRange.moveToBookmark(oData[1]);oRange.select();};} -FCK.Events=new FCKEvents(FCK);FCK.Toolbar=null;FCK.TempBaseTag=FCKConfig.BaseHref.length>0?'':'';FCK.StartEditor=function(){this.EditorWindow=window.frames['eEditorArea'];this.EditorDocument=this.EditorWindow.document;if (FCKBrowserInfo.IsGecko) this.MakeEditable();this.SetHTML(FCKTools.GetLinkedFieldValue());FCKTools.AttachToLinkedFieldFormSubmit(this.UpdateLinkedField);this.SetStatus(FCK_STATUS_ACTIVE);};FCK.SetStatus=function(newStatus){this.Status=newStatus;if (newStatus==FCK_STATUS_ACTIVE){window.onfocus=window.document.body.onfocus=FCK.Focus;if (FCKConfig.StartupFocus) FCK.Focus();if (FCKBrowserInfo.IsIE) FCKScriptLoader.AddScript('js/fckeditorcode_ie_2.js');else FCKScriptLoader.AddScript('js/fckeditorcode_gecko_2.js');};this.Events.FireEvent('OnStatusChange',newStatus);if (this.OnStatusChange) this.OnStatusChange(newStatus);};FCK.GetHTML=function(format){var sHTML;if (FCK.EditMode==FCK_EDITMODE_WYSIWYG){if (FCKBrowserInfo.IsIE) sHTML=this.EditorDocument.body.innerHTML.replace(FCKRegexLib.ToReplace,'$1');else sHTML=this.EditorDocument.body.innerHTML;}else sHTML=document.getElementById('eSourceField').value;if (format) return FCKCodeFormatter.Format(sHTML);else return sHTML;};FCK.GetXHTML=function(format){var bSource=(FCK.EditMode==FCK_EDITMODE_SOURCE);if (bSource) this.SwitchEditMode();if (FCKConfig.FullPage) var sXHTML=FCKXHtml.GetXHTML(this.EditorDocument.getElementsByTagName('html')[0],true,format);else var sXHTML=FCKXHtml.GetXHTML(this.EditorDocument.body,false,format);if (bSource) this.SwitchEditMode();if (FCKBrowserInfo.IsIE) sXHTML=sXHTML.replace(FCKRegexLib.ToReplace,'$1');if (FCK.DocTypeDeclaration&&FCK.DocTypeDeclaration.length>0) sXHTML=FCK.DocTypeDeclaration+'\n'+sXHTML;if (FCK.XmlDeclaration&&FCK.XmlDeclaration.length>0) sXHTML=FCK.XmlDeclaration+'\n'+sXHTML;return sXHTML;};FCK.UpdateLinkedField=function(){if (FCKConfig.EnableXHTML) FCKTools.SetLinkedFieldValue(FCK.GetXHTML(FCKConfig.FormatOutput));else FCKTools.SetLinkedFieldValue(FCK.GetHTML(FCKConfig.FormatOutput));};FCK.ShowContextMenu=function(x,y){if (this.Status!=FCK_STATUS_COMPLETE) return;FCKContextMenu.Show(x,y);this.Events.FireEvent("OnContextMenu");};FCK.RegisteredDoubleClickHandlers=new Object();FCK.OnDoubleClick=function(element){var oHandler=FCK.RegisteredDoubleClickHandlers[element.tagName];if (oHandler){oHandler(element);};};FCK.RegisterDoubleClickHandler=function(handlerFunction,tag){FCK.RegisteredDoubleClickHandlers[tag.toUpperCase()]=handlerFunction;}; +FCK.Events=new FCKEvents(FCK);FCK.Toolbar=null;FCK.TempBaseTag=FCKConfig.BaseHref.length>0?'':'';FCK.StartEditor=function(){this.EditorWindow=window.frames['eEditorArea'];this.EditorDocument=this.EditorWindow.document;if (FCKBrowserInfo.IsGecko) this.MakeEditable();this.SetHTML(FCKTools.GetLinkedFieldValue());FCKTools.AttachToLinkedFieldFormSubmit(this.UpdateLinkedField);this.SetStatus(FCK_STATUS_ACTIVE);};FCK.SetStatus=function(newStatus){this.Status=newStatus;if (newStatus==FCK_STATUS_ACTIVE){window.onfocus=window.document.body.onfocus=FCK.Focus;if (FCKConfig.StartupFocus) FCK.Focus();if (FCKBrowserInfo.IsIE) FCKScriptLoader.AddScript('js/fckeditorcode_ie_2.js');else FCKScriptLoader.AddScript('js/fckeditorcode_gecko_2.js');};this.Events.FireEvent('OnStatusChange',newStatus);if (this.OnStatusChange) this.OnStatusChange(newStatus);if (typeof(FCKConfig.newBgColor)!='undefined') this.EditorDocument.bgColor=FCKConfig.newBgColor;};FCK.GetHTML=function(format){var sHTML;if (FCK.EditMode==FCK_EDITMODE_WYSIWYG){if (FCKBrowserInfo.IsIE) sHTML=this.EditorDocument.body.innerHTML.replace(FCKRegexLib.ToReplace,'$1');else sHTML=this.EditorDocument.body.innerHTML;}else sHTML=document.getElementById('eSourceField').value;if (format) return FCKCodeFormatter.Format(sHTML);else return sHTML;};FCK.GetXHTML=function(format){var bSource=(FCK.EditMode==FCK_EDITMODE_SOURCE);if (bSource) this.SwitchEditMode();if (FCKConfig.FullPage) var sXHTML=FCKXHtml.GetXHTML(this.EditorDocument.getElementsByTagName('html')[0],true,format);else var sXHTML=FCKXHtml.GetXHTML(this.EditorDocument.body,false,format);if (bSource) this.SwitchEditMode();if (FCKBrowserInfo.IsIE) sXHTML=sXHTML.replace(FCKRegexLib.ToReplace,'$1');if (FCK.DocTypeDeclaration&&FCK.DocTypeDeclaration.length>0) sXHTML=FCK.DocTypeDeclaration+'\n'+sXHTML;if (FCK.XmlDeclaration&&FCK.XmlDeclaration.length>0) sXHTML=FCK.XmlDeclaration+'\n'+sXHTML;return sXHTML;};FCK.UpdateLinkedField=function(){if (FCKConfig.EnableXHTML) FCKTools.SetLinkedFieldValue(FCK.GetXHTML(FCKConfig.FormatOutput));else FCKTools.SetLinkedFieldValue(FCK.GetHTML(FCKConfig.FormatOutput));};FCK.ShowContextMenu=function(x,y){if (this.Status!=FCK_STATUS_COMPLETE) return;FCKContextMenu.Show(x,y);this.Events.FireEvent("OnContextMenu");};FCK.RegisteredDoubleClickHandlers=new Object();FCK.OnDoubleClick=function(element){var oHandler=FCK.RegisteredDoubleClickHandlers[element.tagName];if (oHandler){oHandler(element);};};FCK.RegisterDoubleClickHandler=function(handlerFunction,tag){FCK.RegisteredDoubleClickHandlers[tag.toUpperCase()]=handlerFunction;}; FCK.Description="FCKeditor for Internet Explorer 5.5+";FCK._BehaviorsStyle='';FCK.InitializeBehaviors=function(dontReturn){this.EditorDocument.onmousedown=this.EditorDocument.onmouseup=function(){FCK.Focus();FCK.EditorWindow.event.cancelBubble=true;FCK.EditorWindow.event.returnValue=false;};this.EditorDocument.body.onpaste=function(){if (FCK.Status==FCK_STATUS_COMPLETE) return FCK.Events.FireEvent("OnPaste");else return false;};this.EditorDocument.oncontextmenu=function(){var e=this.parentWindow.event;FCK.ShowContextMenu(e.screenX,e.screenY);return false;};if (FCKConfig.UseBROnCarriageReturn||FCKConfig.TabSpaces>0){if (FCKConfig.TabSpaces>0){window.FCKTabHTML='';for (i=0;i ");var oRange=FCK.EditorDocument.selection.createRange();oRange.moveStart('character',-1);oRange.select();FCK.EditorDocument.selection.clear();return false;};}else if (e.keyCode==9&&FCKConfig.TabSpaces>0&&!(e.ctrlKey||e.altKey||e.shiftKey)){FCK.InsertHtml(window.FCKTabHTML);return false;};return true;};};this.EditorDocument.ondblclick=function(){FCK.OnDoubleClick(FCK.EditorWindow.event.srcElement);FCK.EditorWindow.event.cancelBubble=true;};this.EditorDocument.onselectionchange=function(){FCK.Events.FireEvent("OnSelectionChange");};};FCK.Focus=function(){try{if (FCK.EditMode==FCK_EDITMODE_WYSIWYG) FCK.EditorDocument.body.focus();else document.getElementById('eSourceField').focus();}catch(e) {};};FCK.SetHTML=function(html,forceWYSIWYG){if (forceWYSIWYG||FCK.EditMode==FCK_EDITMODE_WYSIWYG){this.EditorDocument.open();if (FCKConfig.FullPage){var sExtraHtml=FCK._BehaviorsStyle+'';if (FCK.TempBaseTag.length>0&&!FCKRegexLib.HasBaseTag.test(html)) sExtraHtml+=FCK.TempBaseTag;html=html.replace(FCKRegexLib.HeadCloser,sExtraHtml+'');this.EditorDocument.write(html);}else{var sHtml=''+''+''+'';sHtml+=FCK._BehaviorsStyle;sHtml+=FCK.TempBaseTag;sHtml+=''+html+'';this.EditorDocument.write(sHtml);};this.EditorDocument.close();this.InitializeBehaviors();this.EditorDocument.body.contentEditable=true;this.Events.FireEvent('OnAfterSetHTML');}else document.getElementById('eSourceField').value=html;};FCK.InsertHtml=function(html){FCK.Focus();var oSel=FCK.EditorDocument.selection;if (oSel.type.toLowerCase()!="none") oSel.clear();oSel.createRange().pasteHTML(html);}; Index: trunk/admin/editor/cmseditor/editor/js/fckeditorcode_gecko_2.js =================================================================== diff -u -r1748 -r1999 --- trunk/admin/editor/cmseditor/editor/js/fckeditorcode_gecko_2.js (.../fckeditorcode_gecko_2.js) (revision 1748) +++ trunk/admin/editor/cmseditor/editor/js/fckeditorcode_gecko_2.js (.../fckeditorcode_gecko_2.js) (revision 1999) @@ -10,7 +10,7 @@ * * This file has been compacted for best loading performance. */ -FCK.RedirectNamedCommands=new Object();FCK.ExecuteNamedCommand=function(commandName,commandParameter){if (FCK.RedirectNamedCommands[commandName]!=null) {FCK.ExecuteRedirectedNamedCommand(commandName,commandParameter);}else{FCK.Focus();if (commandName=="Undo"){if (confirm("This will delete everything on this page. Are you sure?")) FCK.EditorDocument.execCommand(commandName,false,commandParameter);} else FCK.EditorDocument.execCommand(commandName,false,commandParameter);FCK.Events.FireEvent('OnSelectionChange');};};FCK.GetNamedCommandState=function(commandName){try{if (commandName=='InsertHorizontalRule') return FCK_TRISTATE_OFF;if (!FCK.EditorDocument.queryCommandEnabled(commandName)) return FCK_TRISTATE_DISABLED;else {switch (commandName){default:return FCK.EditorDocument.queryCommandState(commandName)?FCK_TRISTATE_ON:FCK_TRISTATE_OFF;};};}catch (e){return FCK_TRISTATE_OFF;};};FCK.GetNamedCommandValue=function(commandName){var sValue='';var eState=FCK.GetNamedCommandState(commandName);if (eState==FCK_TRISTATE_DISABLED) return null;try{sValue=this.EditorDocument.queryCommandValue(commandName);}catch(e) {};return sValue?sValue:'';};FCK.CleanAndPaste=function(html){html=html.replace(/<\/?SPAN[^>]*>/gi,"");html=html.replace(/<(\w[^>]*) class=([^ |>]*)([^>]*)/gi,"<$1$3");html=html.replace(/<(\w[^>]*) style="([^"]*)"([^>]*)/gi,"<$1$3");html=html.replace(/<(\w[^>]*) lang=([^ |>]*)([^>]*)/gi,"<$1$3");html=html.replace(/<\\?\?xml[^>]*>/gi,"");html=html.replace(/<\/?\w+:[^>]*>/gi,"");html=html.replace(/ /," ");var re=new RegExp("(]*>.*?)(<\/P>)","gi");html=html.replace(re,"");FCK.InsertHtml(html);};FCK.Preview=function(){if (typeof(FCKConfig.template_name)!='undefined'&&FCKConfig.template_name!=''){oWindow=window.open(FCKConfig.project_path+'index.php?t='+FCKConfig.template_name,'prewiev','toolbar=yes,location=yes,status=yes,menubar=yes,scrollbars=yes,resizable=yes');if (FCKBrowserInfo.IsIE) {oWindow.attachEvent("onload",FCK.SetPreview);}else oWindow.addEventListener('load',FCK.SetPreview,true);return;}else {var oWindowE=window.open('',null,'toolbar=yes,location=yes,status=yes,menubar=yes,scrollbars=yes,resizable=yes');var sHTML=''+FCK.GetHTML()+'';oWindowE.document.write(sHTML);oWindowE.document.close();};};FCK.SetPreview=function(){oWindow.document.getElementById('block_'+FCKConfig.block_id).innerHTML=FCK.GetHTML();};FCK.SwitchEditMode=function(){var bWYSIWYG=(FCK.EditMode==FCK_EDITMODE_WYSIWYG);document.getElementById('eWysiwyg').style.display=bWYSIWYG?'none':'';document.getElementById('eSource').style.display=bWYSIWYG?'':'none';if (bWYSIWYG) document.getElementById('eSourceField').value=(FCKConfig.EnableXHTML&&FCKConfig.EnableSourceXHTML?FCK.GetXHTML(FCKConfig.FormatSource):FCK.GetHTML(FCKConfig.FormatSource));else FCK.SetHTML(FCK.GetHTML(),true);FCK.EditMode=bWYSIWYG?FCK_EDITMODE_SOURCE:FCK_EDITMODE_WYSIWYG;FCKToolbarSet.RefreshModeState();FCK.Focus();};FCK.CreateElement=function(tag){var e=FCK.EditorDocument.createElement(tag);return FCK.InsertElementAndGetIt(e);};FCK.InsertElementAndGetIt=function(e){e.setAttribute('__FCKTempLabel',1);this.InsertElement(e);var aEls=FCK.EditorDocument.getElementsByTagName(e.tagName);for (var i=0;i]*>/gi,"");html=html.replace(/<(\w[^>]*) class=([^ |>]*)([^>]*)/gi,"<$1$3");html=html.replace(/<(\w[^>]*) style="([^"]*)"([^>]*)/gi,"<$1$3");html=html.replace(/<(\w[^>]*) lang=([^ |>]*)([^>]*)/gi,"<$1$3");html=html.replace(/<\\?\?xml[^>]*>/gi,"");html=html.replace(/<\/?\w+:[^>]*>/gi,"");html=html.replace(/ /," ");var re=new RegExp("(]*>.*?)(<\/P>)","gi");html=html.replace(re,"");FCK.InsertHtml(html);};FCK.Preview=function(){if (typeof(FCKConfig.template_name)!='undefined'&&FCKConfig.template_name!=''){oWindow=window.open(FCKConfig.ProjectPath+'/index.php?t='+FCKConfig.template_name,'prewiev','toolbar=yes,location=yes,status=yes,menubar=yes,scrollbars=yes,resizable=yes');if (FCKBrowserInfo.IsIE) {oWindow.attachEvent("onload",FCK.SetPreview);}else oWindow.addEventListener('load',FCK.SetPreview,true);return;}else {if (typeof(FCKConfig.preview_width)!='undefined'&&typeof(FCKConfig.preview_height)!='undefined'&&FCKConfig.preview_width>0&&FCKConfig.preview_height>0) var oWindowE=window.open('',null,'toolbar=yes,location=yes,status=yes,menubar=yes,scrollbars=yes,resizable=yes,width='+FCKConfig.preview_width+',height='+FCKConfig.preview_height);else var oWindowE=window.open('',null,'toolbar=yes,location=yes,status=yes,menubar=yes,scrollbars=yes,resizable=yes');var sHTML=''+FCK.GetHTML()+'';oWindowE.document.write(sHTML);oWindowE.document.close();};};FCK.SetPreview=function(){oWindow.document.getElementById('block_'+FCKConfig.block_id).innerHTML=FCK.GetHTML();};FCK.SwitchEditMode=function(){var bWYSIWYG=(FCK.EditMode==FCK_EDITMODE_WYSIWYG);document.getElementById('eWysiwyg').style.display=bWYSIWYG?'none':'';document.getElementById('eSource').style.display=bWYSIWYG?'':'none';if (bWYSIWYG) document.getElementById('eSourceField').value=(FCKConfig.EnableXHTML&&FCKConfig.EnableSourceXHTML?FCK.GetXHTML(FCKConfig.FormatSource):FCK.GetHTML(FCKConfig.FormatSource));else FCK.SetHTML(FCK.GetHTML(),true);FCK.EditMode=bWYSIWYG?FCK_EDITMODE_SOURCE:FCK_EDITMODE_WYSIWYG;FCKToolbarSet.RefreshModeState();if (typeof(FCKConfig.newBgColor)!='undefined') FCK.EditorDocument.bgColor=FCKConfig.newBgColor;FCK.Focus();};FCK.CreateElement=function(tag){var e=FCK.EditorDocument.createElement(tag);return FCK.InsertElementAndGetIt(e);};FCK.InsertElementAndGetIt=function(e){e.setAttribute('__FCKTempLabel',1);this.InsertElement(e);var aEls=FCK.EditorDocument.getElementsByTagName(e.tagName);for (var i=0;i]* class="?MsoNormal"?/gi;if (re.test(sHTML)){if (confirm(FCKLang["PasteWordConfirm"])){FCK.CleanAndPaste(sHTML);return false;};};}else return true;};FCK.InsertHtml=function(html){var oSel=FCKSelection.Delete();var oRange=oSel.getRangeAt(0);var oFragment=oRange.createContextualFragment(html);var oLastNode=oFragment.lastChild;oRange.insertNode(oFragment);oRange.setEndAfter(oLastNode);oRange.setStartAfter(oLastNode);oSel.removeAllRanges();oSel=FCK.EditorWindow.getSelection();this.Focus();};FCK.InsertElement=function(element){var oSel=FCKSelection.Delete();var oRange=oSel.getRangeAt(0);oRange.insertNode(element);oRange.setEndAfter(element);oRange.setStartAfter(element);this.Focus();};FCK.PasteAsPlainText=function(){FCKDialog.OpenDialog('FCKDialog_Paste',FCKLang.PasteAsText,'dialog/fck_paste.html',400,330,'PlainText');};FCK.PasteFromWord=function(){FCKDialog.OpenDialog('FCKDialog_Paste',FCKLang.PasteFromWord,'dialog/fck_paste.html',400,330,'Word');};FCK.GetClipboardHTML=function(){return '';};FCK.CreateLink=function(url){FCK.ExecuteNamedCommand('Unlink');if (url.length>0){var sTempUrl='javascript:void(0);/*'+(new Date().getTime())+'*/';FCK.ExecuteNamedCommand('CreateLink',sTempUrl);var oLink=document.evaluate("//a[@href='"+sTempUrl+"']",this.EditorDocument.body,null,9,null).singleNodeValue;if (oLink){oLink.href=url;return oLink;};};}; var FCKSelection=new Object();FCK.Selection=FCKSelection; FCKSelection.GetType=function(){this._Type='Text';var oSel=FCK.EditorWindow.getSelection();if (oSel&&oSel.rangeCount==1){var oRange=oSel.getRangeAt(0);if (oRange.startContainer==oRange.endContainer&&(oRange.endOffset-oRange.startOffset)==1) this._Type='Control';};return this._Type;};FCKSelection.GetSelectedElement=function(){if (this.GetType()=='Control'){var oSel=FCK.EditorWindow.getSelection();return oSel.anchorNode.childNodes[oSel.anchorOffset];};};FCKSelection.GetParentElement=function(){if (this.GetType()=='Control') return FCKSelection.GetSelectedElement().parentElement;else{var oSel=FCK.EditorWindow.getSelection();if (oSel){var oNode=oSel.anchorNode;while (oNode&&oNode.nodeType!=1) oNode=oNode.parentNode;return oNode;};};};FCKSelection.MoveToNode=function(node){var oSel=FCK.EditorWindow.getSelection();for (i=oSel.rangeCount-1;i>=0;i--){if (i==0) oSel.getRangeAt(i).selectNodeContents(node);else oSel.removeRange(oSel.getRangeAt(i));};};FCKSelection.HasAncestorNode=function(nodeTagName){var oContainer=this.GetSelectedElement();if (!oContainer&&FCK.EditorWindow){try { oContainer=FCK.EditorWindow.getSelection().getRangeAt(0).startContainer;}catch(e){};};while (oContainer){if (oContainer.tagName==nodeTagName) return true;oContainer=oContainer.parentNode;};return false;};FCKSelection.MoveToAncestorNode=function(nodeTagName){var oNode;var oContainer=this.GetSelectedElement();if (!oContainer) oContainer=FCK.EditorWindow.getSelection().getRangeAt(0).startContainer;while (oContainer){if (oContainer.tagName==nodeTagName) return oContainer;oContainer=oContainer.parentNode;};};FCKSelection.Delete=function(){var oSel=FCK.EditorWindow.getSelection();for (var i=0;i');else FCK.ExecuteNamedCommand('FormatBlock','<'+formatName+'>');};FCKFormatBlockCommand.prototype.GetState=function(){return FCK.GetNamedCommandValue('FormatBlock');};var FCKPreviewCommand=function(){this.Name='Preview';};FCKPreviewCommand.prototype.Execute=function(){FCK.Preview();};FCKPreviewCommand.prototype.GetState=function(){return FCK_TRISTATE_OFF;};var FCKSaveCommand=function(){this.Name='Save';};FCKSaveCommand.prototype.Execute=function(){var oForm=FCK.LinkedField.form;oForm.submit();};FCKSaveCommand.prototype.GetState=function(){return FCK_TRISTATE_OFF;};var FCKNewPageCommand=function(){this.Name='NewPage';};FCKNewPageCommand.prototype.Execute=function(){FCK.SetHTML(FCKBrowserInfo.IsGecko?' ':'');};FCKNewPageCommand.prototype.GetState=function(){return FCK_TRISTATE_OFF;};var FCKSourceCommand=function(){this.Name='Source';};FCKSourceCommand.prototype.Execute=function(){FCK.SwitchEditMode();};FCKSourceCommand.prototype.GetState=function(){return (FCK.EditMode==FCK_EDITMODE_WYSIWYG?FCK_TRISTATE_OFF:FCK_TRISTATE_ON);} +var FCKDialogCommand=function(name,title,url,width,height,getStateFunction,getStateParam){this.Name=name;this.Title=title;this.Url=url;this.Width=width;this.Height=height;this.GetStateFunction=getStateFunction;this.GetStateParam=getStateParam;};FCKDialogCommand.prototype.Execute=function(){FCKDialog.OpenDialog('FCKDialog_'+this.Name,this.Title,this.Url,this.Width,this.Height);};FCKDialogCommand.prototype.GetState=function(){if (this.GetStateFunction) return this.GetStateFunction(this.GetStateParam);else return FCK_TRISTATE_OFF;};var FCKUndefinedCommand=function(){this.Name='Undefined';};FCKUndefinedCommand.prototype.Execute=function(){alert(FCKLang.NotImplemented);};FCKUndefinedCommand.prototype.GetState=function(){return FCK_TRISTATE_OFF;};var FCKFontNameCommand=function(){this.Name='FontName';};FCKFontNameCommand.prototype.Execute=function(fontName){if (fontName==null||fontName==""){}else FCK.ExecuteNamedCommand('FontName',fontName);};FCKFontNameCommand.prototype.GetState=function(){return FCK.GetNamedCommandValue('FontName');};var FCKFontSizeCommand=function(){this.Name='FontSize';};FCKFontSizeCommand.prototype.Execute=function(fontSize){if (typeof(fontSize)=='string') fontSize=parseInt(fontSize);if (fontSize==null||fontSize==''){FCK.ExecuteNamedCommand('FontSize',3);}else FCK.ExecuteNamedCommand('FontSize',fontSize);};FCKFontSizeCommand.prototype.GetState=function(){return FCK.GetNamedCommandValue('FontSize');};var FCKFormatBlockCommand=function(){this.Name='FormatBlock';};FCKFormatBlockCommand.prototype.Execute=function(formatName){if (formatName==null||formatName=='') FCK.ExecuteNamedCommand('FormatBlock','

');else FCK.ExecuteNamedCommand('FormatBlock','<'+formatName+'>');};FCKFormatBlockCommand.prototype.GetState=function(){return FCK.GetNamedCommandValue('FormatBlock');};var FCKPreviewCommand=function(){this.Name='Preview';};FCKPreviewCommand.prototype.Execute=function(){FCK.Preview();};FCKPreviewCommand.prototype.GetState=function(){return FCK_TRISTATE_OFF;};var FCKSaveCommand=function(){this.Name='Save';};FCKSaveCommand.prototype.Execute=function(){var oForm=FCK.LinkedField.form;oForm.submit();};FCKSaveCommand.prototype.GetState=function(){return FCK_TRISTATE_OFF;};var FCKNewPageCommand=function(){this.Name='NewPage';};FCKNewPageCommand.prototype.Execute=function(){FCK.SetHTML(FCKBrowserInfo.IsGecko?' ':'');if (typeof(FCKConfig.newBgColor)!='undefined') FCK.EditorDocument.bgColor=FCKConfig.newBgColor;};FCKNewPageCommand.prototype.GetState=function(){return FCK_TRISTATE_OFF;};var FCKSourceCommand=function(){this.Name='Source';};FCKSourceCommand.prototype.Execute=function(){FCK.SwitchEditMode();};FCKSourceCommand.prototype.GetState=function(){return (FCK.EditMode==FCK_EDITMODE_WYSIWYG?FCK_TRISTATE_OFF:FCK_TRISTATE_ON);} var FCKSpellCheckCommand=function(){this.Name='SpellCheck';this.IsEnabled=(FCKConfig.SpellChecker=='SpellerPages');};FCKSpellCheckCommand.prototype.Execute=function(){FCKDialog.OpenDialog('FCKDialog_SpellCheck','Spell Check','dialog/fck_spellerpages.html',440,480);};FCKSpellCheckCommand.prototype.GetState=function(){return this.IsEnabled?FCK_TRISTATE_OFF:FCK_TRISTATE_DISABLED;} var FCKTextColorCommand=function(type){this.Name=type=='ForeColor'?'TextColor':'BGColor';this.Type=type;this._Panel=new FCKPanel();this._Panel.StyleSheet=FCKConfig.SkinPath+'fck_contextmenu.css';this._Panel.Create();this._CreatePanelBody(this._Panel.Document,this._Panel.PanelDiv);};FCKTextColorCommand.prototype.Execute=function(panelX,panelY,relElement){FCK._ActiveColorPanelType=this.Type;this._Panel.Show(panelX,panelY,relElement);};FCKTextColorCommand.prototype.SetColor=function(color){if (FCK._ActiveColorPanelType=='ForeColor') FCK.ExecuteNamedCommand('ForeColor',color);else if (FCKBrowserInfo.IsGecko) FCK.ExecuteNamedCommand('hilitecolor',color);else FCK.ExecuteNamedCommand('BackColor',color);delete FCK._ActiveColorPanelType;};FCKTextColorCommand.prototype.GetState=function(){return FCK_TRISTATE_OFF;};FCKTextColorCommand.prototype._CreatePanelBody=function(targetDocument,targetDiv){function CreateSelectionDiv(){var oDiv=targetDocument.createElement("DIV");oDiv.className='ColorDeselected';oDiv.onmouseover=function() { this.className='ColorSelected';};oDiv.onmouseout=function() { this.className='ColorDeselected';};return oDiv;};var oTable=targetDiv.appendChild(targetDocument.createElement("TABLE"));oTable.style.tableLayout='fixed';oTable.cellPadding=0;oTable.cellSpacing=0;oTable.border=0;oTable.width=150;var oCell=oTable.insertRow(-1).insertCell(-1);oCell.colSpan=8;var oDiv=oCell.appendChild(CreateSelectionDiv());oDiv.innerHTML='\ \ \ \ \
'+FCKLang.ColorAutomatic+'
';oDiv.Command=this;oDiv.onclick=function(){this.className='ColorDeselected';this.Command.SetColor('');this.Command._Panel.Hide();};var aColors=FCKConfig.FontColors.split(',');var iCounter=0;while (iCounter

';oDiv.Command=this;oDiv.onclick=function(){this.className='ColorDeselected';this.Command.SetColor('#'+this.Color);this.Command._Panel.Hide();};};};var oCell=oTable.insertRow(-1).insertCell(-1);oCell.colSpan=8;var oDiv=oCell.appendChild(CreateSelectionDiv());oDiv.innerHTML='
'+FCKLang.ColorMoreColors+'
';oDiv.Command=this;oDiv.onclick=function(){this.className='ColorDeselected';this.Command._Panel.Hide();FCKDialog.OpenDialog('FCKDialog_Color',FCKLang.DlgColorTitle,'dialog/fck_colorselector.html',400,330,this.Command.SetColor);};} var FCKPastePlainTextCommand=function(){this.Name='PasteText';};FCKPastePlainTextCommand.prototype.Execute=function(){FCK.PasteAsPlainText();};FCKPastePlainTextCommand.prototype.GetState=function(){return FCK.GetNamedCommandState('Paste');}; Index: trunk/admin/editor/cmseditor/editor/js/fckeditorcode_gecko_1.js =================================================================== diff -u -r1975 -r1999 --- trunk/admin/editor/cmseditor/editor/js/fckeditorcode_gecko_1.js (.../fckeditorcode_gecko_1.js) (revision 1975) +++ trunk/admin/editor/cmseditor/editor/js/fckeditorcode_gecko_1.js (.../fckeditorcode_gecko_1.js) (revision 1999) @@ -21,5 +21,5 @@ FCKXHtml._GetMainXmlString=function(){var oSerializer=new XMLSerializer();return oSerializer.serializeToString(this.MainNode).replace(FCKXHtmlEntities.GeckoEntitiesMarkerRegex,'&');};FCKXHtml._AppendEntity=function(xmlNode,entity){xmlNode.appendChild(this.XML.createTextNode('#?-:'+entity+';'));};FCKXHtml._AppendAttributes=function(xmlNode,htmlNode,node){var aAttributes=htmlNode.attributes;for (var n=0;n]*\>/gi;FCKCodeFormatter.Regex.BlocksCloser=/\<\/(P|DIV|H1|H2|H3|H4|H5|H6|ADDRESS|PRE|OL|UL|LI|TITLE|META|LINK|BASE|SCRIPT|LINK|TD|AREA|OPTION)[^\>]*\>/gi;FCKCodeFormatter.Regex.NewLineTags=/\<(BR|HR)[^\>]\>/gi;FCKCodeFormatter.Regex.MainTags=/\<\/?(HTML|HEAD|BODY|FORM|TABLE|TBODY|THEAD|TR)[^\>]*\>/gi;FCKCodeFormatter.Regex.LineSplitter=/\s*\n+\s*/g;FCKCodeFormatter.Regex.IncreaseIndent=/^\<(HTML|HEAD|BODY|FORM|TABLE|TBODY|THEAD|TR|UL|OL)[ \/\>]/i;FCKCodeFormatter.Regex.DecreaseIndent=/^\<\/(HTML|HEAD|BODY|FORM|TABLE|TBODY|THEAD|TR|UL|OL)[ \>]/i;FCKCodeFormatter.Regex.FormatIndentatorRemove=new RegExp(FCKConfig.FormatIndentator);FCKCodeFormatter.Format=function(html){var sFormatted=html.replace(this.Regex.BlocksOpener,'\n$&');;sFormatted=sFormatted.replace(this.Regex.BlocksCloser,'$&\n');sFormatted=sFormatted.replace(this.Regex.NewLineTags,'$&\n');sFormatted=sFormatted.replace(this.Regex.MainTags,'\n$&\n');var sIndentation='';var asLines=sFormatted.split(this.Regex.LineSplitter);sFormatted='';for (var i=0;i=0&&sHtml==FCKUndo.SavedData[FCKUndo.CurrentIndex][0]) return;if (FCKUndo.CurrentIndex+1>=FCKConfig.MaxUndoLevels) FCKUndo.SavedData.shift();else FCKUndo.CurrentIndex++;var sBookmark;if (FCK.EditorDocument.selection.type=='Text') sBookmark=FCK.EditorDocument.selection.createRange().getBookmark();FCKUndo.SavedData[FCKUndo.CurrentIndex]=[sHtml,sBookmark];FCK.Events.FireEvent("OnSelectionChange");};FCKUndo.Undo=function(){if (FCKUndo.CurrentIndex>0){if (FCKUndo.CurrentIndex==(FCKUndo.SavedData.length-1)){FCKUndo.SaveUndoStep();};FCKUndo._ApplyUndoLevel(--FCKUndo.CurrentIndex);FCK.Events.FireEvent("OnSelectionChange");};};FCKUndo.Redo=function(){if (FCKUndo.CurrentIndex<(FCKUndo.SavedData.length-1)){FCKUndo._ApplyUndoLevel(++FCKUndo.CurrentIndex);FCK.Events.FireEvent("OnSelectionChange");};};FCKUndo._ApplyUndoLevel=function(level){var oData=FCKUndo.SavedData[level];FCK.EditorDocument.body.innerHTML=oData[0];if (oData[1]){var oRange=FCK.EditorDocument.selection.createRange();oRange.moveToBookmark(oData[1]);oRange.select();};} -FCK.Events=new FCKEvents(FCK);FCK.Toolbar=null;FCK.TempBaseTag=FCKConfig.BaseHref.length>0?'':'';FCK.StartEditor=function(){this.EditorWindow=window.frames['eEditorArea'];this.EditorDocument=this.EditorWindow.document;if (FCKBrowserInfo.IsGecko) this.MakeEditable();this.SetHTML(FCKTools.GetLinkedFieldValue());FCKTools.AttachToLinkedFieldFormSubmit(this.UpdateLinkedField);this.SetStatus(FCK_STATUS_ACTIVE);};FCK.SetStatus=function(newStatus){this.Status=newStatus;if (newStatus==FCK_STATUS_ACTIVE){window.onfocus=window.document.body.onfocus=FCK.Focus;if (FCKConfig.StartupFocus) FCK.Focus();if (FCKBrowserInfo.IsIE) FCKScriptLoader.AddScript('js/fckeditorcode_ie_2.js');else FCKScriptLoader.AddScript('js/fckeditorcode_gecko_2.js');};this.Events.FireEvent('OnStatusChange',newStatus);if (this.OnStatusChange) this.OnStatusChange(newStatus);};FCK.GetHTML=function(format){var sHTML;if (FCK.EditMode==FCK_EDITMODE_WYSIWYG){if (FCKBrowserInfo.IsIE) sHTML=this.EditorDocument.body.innerHTML.replace(FCKRegexLib.ToReplace,'$1');else sHTML=this.EditorDocument.body.innerHTML;}else sHTML=document.getElementById('eSourceField').value;if (format) return FCKCodeFormatter.Format(sHTML);else return sHTML;};FCK.GetXHTML=function(format){var bSource=(FCK.EditMode==FCK_EDITMODE_SOURCE);if (bSource) this.SwitchEditMode();if (FCKConfig.FullPage) var sXHTML=FCKXHtml.GetXHTML(this.EditorDocument.getElementsByTagName('html')[0],true,format);else var sXHTML=FCKXHtml.GetXHTML(this.EditorDocument.body,false,format);if (bSource) this.SwitchEditMode();if (FCKBrowserInfo.IsIE) sXHTML=sXHTML.replace(FCKRegexLib.ToReplace,'$1');if (FCK.DocTypeDeclaration&&FCK.DocTypeDeclaration.length>0) sXHTML=FCK.DocTypeDeclaration+'\n'+sXHTML;if (FCK.XmlDeclaration&&FCK.XmlDeclaration.length>0) sXHTML=FCK.XmlDeclaration+'\n'+sXHTML;return sXHTML;};FCK.UpdateLinkedField=function(){if (FCKConfig.EnableXHTML) FCKTools.SetLinkedFieldValue(FCK.GetXHTML(FCKConfig.FormatOutput));else FCKTools.SetLinkedFieldValue(FCK.GetHTML(FCKConfig.FormatOutput));};FCK.ShowContextMenu=function(x,y){if (this.Status!=FCK_STATUS_COMPLETE) return;FCKContextMenu.Show(x,y);this.Events.FireEvent("OnContextMenu");};FCK.RegisteredDoubleClickHandlers=new Object();FCK.OnDoubleClick=function(element){var oHandler=FCK.RegisteredDoubleClickHandlers[element.tagName];if (oHandler){oHandler(element);};};FCK.RegisterDoubleClickHandler=function(handlerFunction,tag){FCK.RegisteredDoubleClickHandlers[tag.toUpperCase()]=handlerFunction;}; +FCK.Events=new FCKEvents(FCK);FCK.Toolbar=null;FCK.TempBaseTag=FCKConfig.BaseHref.length>0?'':'';FCK.StartEditor=function(){this.EditorWindow=window.frames['eEditorArea'];this.EditorDocument=this.EditorWindow.document;if (FCKBrowserInfo.IsGecko) this.MakeEditable();this.SetHTML(FCKTools.GetLinkedFieldValue());FCKTools.AttachToLinkedFieldFormSubmit(this.UpdateLinkedField);this.SetStatus(FCK_STATUS_ACTIVE);};FCK.SetStatus=function(newStatus){this.Status=newStatus;if (newStatus==FCK_STATUS_ACTIVE){window.onfocus=window.document.body.onfocus=FCK.Focus;if (FCKConfig.StartupFocus) FCK.Focus();if (FCKBrowserInfo.IsIE) FCKScriptLoader.AddScript('js/fckeditorcode_ie_2.js');else FCKScriptLoader.AddScript('js/fckeditorcode_gecko_2.js');};this.Events.FireEvent('OnStatusChange',newStatus);if (this.OnStatusChange) this.OnStatusChange(newStatus);if (typeof(FCKConfig.newBgColor)!='undefined') this.EditorDocument.bgColor=FCKConfig.newBgColor;};FCK.GetHTML=function(format){var sHTML;if (FCK.EditMode==FCK_EDITMODE_WYSIWYG){if (FCKBrowserInfo.IsIE) sHTML=this.EditorDocument.body.innerHTML.replace(FCKRegexLib.ToReplace,'$1');else sHTML=this.EditorDocument.body.innerHTML;}else sHTML=document.getElementById('eSourceField').value;if (format) return FCKCodeFormatter.Format(sHTML);else return sHTML;};FCK.GetXHTML=function(format){var bSource=(FCK.EditMode==FCK_EDITMODE_SOURCE);if (bSource) this.SwitchEditMode();if (FCKConfig.FullPage) var sXHTML=FCKXHtml.GetXHTML(this.EditorDocument.getElementsByTagName('html')[0],true,format);else var sXHTML=FCKXHtml.GetXHTML(this.EditorDocument.body,false,format);if (bSource) this.SwitchEditMode();if (FCKBrowserInfo.IsIE) sXHTML=sXHTML.replace(FCKRegexLib.ToReplace,'$1');if (FCK.DocTypeDeclaration&&FCK.DocTypeDeclaration.length>0) sXHTML=FCK.DocTypeDeclaration+'\n'+sXHTML;if (FCK.XmlDeclaration&&FCK.XmlDeclaration.length>0) sXHTML=FCK.XmlDeclaration+'\n'+sXHTML;return sXHTML;};FCK.UpdateLinkedField=function(){if (FCKConfig.EnableXHTML) FCKTools.SetLinkedFieldValue(FCK.GetXHTML(FCKConfig.FormatOutput));else FCKTools.SetLinkedFieldValue(FCK.GetHTML(FCKConfig.FormatOutput));};FCK.ShowContextMenu=function(x,y){if (this.Status!=FCK_STATUS_COMPLETE) return;FCKContextMenu.Show(x,y);this.Events.FireEvent("OnContextMenu");};FCK.RegisteredDoubleClickHandlers=new Object();FCK.OnDoubleClick=function(element){var oHandler=FCK.RegisteredDoubleClickHandlers[element.tagName];if (oHandler){oHandler(element);};};FCK.RegisterDoubleClickHandler=function(handlerFunction,tag){FCK.RegisteredDoubleClickHandlers[tag.toUpperCase()]=handlerFunction;}; FCK.Description="FCKeditor for Gecko Browsers";FCK.InitializeBehaviors=function(){var oOnContextMenu=function(e){e.preventDefault();FCK.ShowContextMenu(e.clientX,e.clientY);};this.EditorDocument.addEventListener('contextmenu',oOnContextMenu,true);var oOnKeyDown=function(e){if (e.ctrlKey&&!e.shiftKey&&!e.altKey){if (e.which==86||e.which==118){if (FCK.Status==FCK_STATUS_COMPLETE){if (!FCK.Events.FireEvent("OnPaste")) e.preventDefault();}else e.preventDefault();};};};this.EditorDocument.addEventListener('keydown',oOnKeyDown,true);this.ExecOnSelectionChange=function(){FCK.Events.FireEvent("OnSelectionChange");};this.ExecOnSelectionChangeTimer=function(){if (FCK.LastOnChangeTimer) window.clearTimeout(FCK.LastOnChangeTimer);FCK.LastOnChangeTimer=window.setTimeout(FCK.ExecOnSelectionChange,100);};this.EditorDocument.addEventListener('mouseup',this.ExecOnSelectionChange,false);this.EditorDocument.addEventListener('keyup',this.ExecOnSelectionChangeTimer,false);this._DblClickListener=function(e){FCK.OnDoubleClick(e.target);e.stopPropagation();};this.EditorDocument.addEventListener('dblclick',this._DblClickListener,true);this._OnLoad=function(){if (this._FCK_HTML){this.document.body.innerHTML=this._FCK_HTML;this._FCK_HTML=null;};};this.EditorWindow.addEventListener('load',this._OnLoad,true);};FCK.MakeEditable=function(){this.EditorWindow.document.designMode='on';this.EditorWindow.document.execCommand('useCSS',false,!FCKConfig.GeckoUseSPAN);};FCK.Focus=function(){try{FCK.EditorWindow.focus();}catch(e) {};};FCK.SetHTML=function(html,forceWYSIWYG){if (forceWYSIWYG||FCK.EditMode==FCK_EDITMODE_WYSIWYG){this.EditorDocument.open();if (FCKConfig.FullPage&&FCKRegexLib.BodyContents.test(html)){if (FCK.TempBaseTag.length>0&&!FCKRegexLib.HasBaseTag.test(html)) html=html.replace(FCKRegexLib.HeadCloser,FCK.TempBaseTag+'');html=html.replace(FCKRegexLib.HeadCloser,'');var oMatch=html.match(FCKRegexLib.BodyContents);var sOpener=oMatch[1];var sContents=oMatch[2];var sCloser=oMatch[3];this.EditorDocument.write(sOpener+' '+sCloser);}else{var sHtml=''+''+''+'';sHtml+=FCK.TempBaseTag;sHtml+=' ';this.EditorDocument.write(sHtml);};this.EditorDocument.close();if (this.EditorDocument.body) this.EditorDocument.body.innerHTML=sContents?sContents:html;else this.EditorWindow._FCK_HTML=sContents?sContents:html;this.InitializeBehaviors();this.Events.FireEvent('OnAfterSetHTML');}else document.getElementById('eSourceField').value=html;};