Index: trunk/admin/editor/cmseditor/editor/js/fckeditorcode_ie_2.js =================================================================== diff -u -r1415 -r1455 --- trunk/admin/editor/cmseditor/editor/js/fckeditorcode_ie_2.js (.../fckeditorcode_ie_2.js) (revision 1415) +++ trunk/admin/editor/cmseditor/editor/js/fckeditorcode_ie_2.js (.../fckeditorcode_ie_2.js) (revision 1455) @@ -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();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(){var oWindow=window.open('',null,'toolbar=yes,location=yes,status=yes,menubar=yes,scrollbars=yes,resizable=yes');var sHTML=''+FCK.GetHTML()+'';oWindow.document.write(sHTML);oWindow.document.close();};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(){var oWindow=window.open('',null,'toolbar=yes,location=yes,status=yes,menubar=yes,scrollbars=yes,resizable=yes');var sHTML=''+FCK.GetHTML()+'';oWindow.document.write(sHTML);oWindow.document.close();};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]* 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;i0) {width=width_+'%';};};this.DOMRow=this.DOMTable.insertRow(-1);var oCell=this.DOMRow.insertCell(-1);oCell.className='TB_Start';oCell.innerHTML='';FCKToolbarSet.DOMElement.appendChild(this.DOMTable);};FCKToolbar.prototype.AddItem=function(toolbarItem){this.Items[this.Items.length]=toolbarItem;toolbarItem.CreateInstance(this);};FCKToolbar.prototype.AddEmpty=function(){var oCell=this.DOMRow.insertCell(-1);oCell.unselectable='on';oCell.width='50%';oCell.innerHTML='';};FCKToolbar.prototype.AddSeparator=function(){var oCell=this.DOMRow.insertCell(-1);oCell.unselectable='on';oCell.innerHTML='';};FCKToolbar.prototype.AddTerminator=function(){var oCell=this.DOMRow.insertCell(-1);oCell.className='TB_End';oCell.innerHTML='';};FCKToolbar.prototype.AddBigSeparator=function(){var oCell=this.DOMRow.insertCell(-1);oCell.className='TB_Start';oCell.innerHTML='';}; var FCKToolbarBreak=function(){var oBreakDiv=document.createElement('div');oBreakDiv.className='TB_Break';oBreakDiv.style.clear=FCKLang.Dir=='rtl'?'left':'right';FCKToolbarSet.DOMElement.appendChild(oBreakDiv);} -var FCKToolbarSet=FCK.ToolbarSet=new Object();document.getElementById('ExpandHandle').title=FCKLang.ToolbarExpand;document.getElementById('CollapseHandle').title=FCKLang.ToolbarCollapse;FCKToolbarSet.Toolbars=new Array();FCKToolbarSet.ItemsWysiwygOnly=new Array();FCKToolbarSet.ItemsContextSensitive=new Array();FCKToolbarSet.Expand=function(){document.getElementById('Collapsed').style.display='none';document.getElementById('Expanded').style.display='';if (!FCKBrowserInfo.IsIE){window.setTimeout("window.onresize()",1);};};FCKToolbarSet.Collapse=function(){document.getElementById('Collapsed').style.display='';document.getElementById('Expanded').style.display='none';if (!FCKBrowserInfo.IsIE){window.setTimeout("window.onresize()",1);};};FCKToolbarSet.Restart=function(){if (!FCKConfig.ToolbarCanCollapse||FCKConfig.ToolbarStartExpanded) this.Expand();else this.Collapse();document.getElementById('CollapseHandle').style.display=FCKConfig.ToolbarCanCollapse?'':'none';};FCKToolbarSet.Load=function(toolbarSetName){this.DOMElement=document.getElementById('eToolbar');var ToolbarSet=FCKConfig.ToolbarSets[toolbarSetName];if (!ToolbarSet){alert(FCKLang.UnknownToolbarSet.replace(/%1/g,toolbarSetName));return;};this.Toolbars=new Array();for (var x=0;x';oCell=this._Row.insertCell(-1);oCell.className='CM_Label';oCell.unselectable='on';oCell.noWrap=true;oCell.innerHTML=this.Label;};FCKContextMenuItem.prototype.SetVisible=function(isVisible){this._Row.style.display=isVisible?'':'none';};FCKContextMenuItem.prototype.RefreshState=function(){switch (this.Command.GetState()){case FCK_TRISTATE_ON:case FCK_TRISTATE_OFF:this._Row.className='CM_Option';break;default:this._Row.className='CM_Disabled';break;};};