📄 webhtmleditor.txt.exclude
字号:
moduleArgs.Title = title;
moduleArgs.Id = id;
moduleArgs.Place = place;
moduleArgs.Dockable = dockable;
moduleArgs.CellsLen = cellsLen;
var module;
if(name=="WebHtmlEditorViewDom")
{
module = new WebHtmlEditorViewDom(moduleArgs);
}
else if(name=="WebHtmlEditorStatistics")
{
module = new WebHtmlEditorStatistics(moduleArgs);
}
else if(name=="WebHtmlEditorViewRuntimeHtml")
{
module = new WebHtmlEditorViewRuntimeHtml(moduleArgs);
}
else if(name == "WebHtmlEditorPropertyInspector")
{
module = new WebHtmlEditorPropertyInspector(moduleArgs);
}
if(!module)
{
return ;
}
this.ModulesArray[this.ModulesArray.length]=module;
if (!module.IsCreated)
{
var elem=module.Create();
var parentNode=this.GetPlacedToolBarHtmlElement(module.Place);
parentNode.appendChild(elem);
if (module.Dockable)
{
this.RegisterDockableObject(elem, true, false, false, effectsUpdateRate, effectsDuration, effectsEnable);
}
}
module.Show(enable);
return module;
} ;
lionsky.prototype.SetModulesVisible= function (flag)
{
var array=this.ModulesArray;
for (var count=0; count<array.length; count++)
{
array[count].SetVisible(flag);
}
} ;
lionsky.prototype.GetToolBarTableObjectByName= function (name)
{
var toolbar;
for (var j=0; j<this.ToolBarManager.ToolBarTableObjectArray.length; j++)
{
toolbar=this.ToolBarManager.ToolBarTableObjectArray[j];
if (toolbar.Name == name)
{
return toolbar;
}
}
return null;
} ;
WindowOnUnLoad= function ()
{
var globalArray=WebHtmlEditorGlobalArray;
for (var index=0; index<globalArray.length; index++)
{
try
{
var editor=globalArray[index];
if ( true == editor.unload)
{
continue;
}
editor.unload= true;
try
{
var array = this.ModulesArray;
for (var i=0; i<array.length; i++)
{
if(array[i].Clear)
{
array[i].Clear();
}
array[i]=null;
}
}
catch(e){}
try
{
var toolBarButtonArray=editor.ToolBarButtonArray;
for (var i=0; i<toolBarButtonArray.length; i++)
{
if(toolBarButtonArray[i].Clear)
{
toolBarButtonArray[i].Clear();
}
toolBarButtonArray[i]=null;
}
}
catch (e){} ;
try
{
var dockingManager = this.DockingManager;
for (var i=0; i<dockingManager.DockableObjects.length; i++)
{
if(dockingManager.DockableObjects[i].Clear)
{
dockingManager.DockableObjects[i].Clear();
}
dockingManager.DockableObjects[i]=null;
}
for (var i=0; i<dockingManager.DockingZones.length; i++)
{
if(dockingManager.DockingZones[i].Clear)
{
dockingManager.DockingZones[i].Clear();
}
dockingManager.DockingZones[i]=null;
}
dockingManager.DockableObjects=null;
dockingManager.DockingZones=null;
dockingManager.Editor=null;
dockingManager.DragHelperElem=null;
dockingManager.DragHelperTooltip=null;
dockingManager.DragHelperTooltipElem=null;
Cache_DragImage = null;
}
catch(e){};
try
{
if(editor.ToolBarManager.Clear)
{
editor.ToolBarManager.Clear();
}
if (editor.History.Clear)
{
editor.History.Clear();
}
if (editor.KeyObject.Clear)
{
editor.KeyObject.Clear();
}
if (editor.ContextMenusManager)
{
editor.ContextMenusManager.Clear();
}
}
catch (e){} ;
editor.RemoveAllDocumentEvent();
for (var item in editor)
{
if (typeof(editor[item]) != "function")
{
editor[item]=null;
}
}
}
catch (e){} ;
}
};
function lionsky(id)
{
this.Id = id;
this.UniqueID = "";
this.ClientID = "";
this.CurrMode = EDIT_MODE;
this.EventArray = [];
this.DefaultStyle = null;
this.Width = "600px";
this.Height = "600px";
this.License = "";
this.CurrentContentAreaCssClass = "";
this.SystemEventArray=[];
this.ToolBarManager=null;
this.History = null;
this.ToolBarButtonArray = [];
this.ModulesArray = [];
this.Shadows = new Array();
this.IsIE = (null != document.all) && (window.opera == null);
this.EmptyList="";
this.FiltersManager = new FiltersManage();
this.FontNameArray=eval(LR["FontNameArray.options"]);
this.FormatBlockArray=eval(LR["FormatBlock.options"]);
}
lionsky.prototype.Initialize = function()
{
this.Browser_Agt = (navigator==null||navigator.userAgent==null)?'':navigator.userAgent.toLowerCase();
this.Browser_App = (navigator==null||navigator.appVersion==null)?'':navigator.appVersion;
this.Browser_Major = parseInt(this.Browser_App);
this.Browser_Opera = this.Browser_Agt.indexOf('opera')!=-1;
this.Browser_IE = !this.Browser_Opera&&(this.Browser_Agt.indexOf('msie')!=-1);
this.Browser_IEmac = this.Browser_IE&&(this.Browser_Agt.indexOf('mac')!=-1);
this.Browser_Safari = this.Browser_Agt.indexOf('safari')!=-1;
this.Browser_Konqueror = this.Browser_Agt.indexOf('konqueror')!=-1;
this.Browser_Mozilla = !this.Browser_IE&&!this.Browser_Opera&&((this.Browser_Agt.indexOf('netscape')!=-1)||(this.Browser_Agt.indexOf('mozilla')!=-1))&&(this.Browser_Major>=5);
this.Browser_IE3 = this.Browser_IE&&(this.Browser_Major<4);
this.Browser_IE4 = this.Browser_IE&&(this.Browser_Major==4)&&(this.Browser_Agt.indexOf("msie 4")!=-1);
this.Browser_IE5point5 = this.Browser_IE&&(this.Browser_Major==4)&&(this.Browser_Agt.indexOf("msie 5.5")!=-1);
this.Browser_IE5 = this.Browser_IE&&(this.Browser_Major==4)&&(this.Browser_Agt.indexOf("msie 5")!=-1)&&!this.Browser_IE5point5;
this.Browser_IE5point5plus = this.Browser_IE&&!this.Browser_IE3&&!this.Browser_IE4&&!this.Browser_IE5;
this.Browser_Transitions = this.Browser_IE5point5plus&&(this.Browser_Agt.indexOf('nt 4')==-1);
this.Browser_IE6plus = this.Browser_IE&&!this.Browser_IE3&&!this.Browser_IE4&&!this.Browser_IE5&&!this.Browser_IE5point5;
this.Browser_NS6 = document.getElementById&&!document.all;
this.Browser_Shadows = this.Browser_IE6plus;
this.Browser_Slides = !this.Browser_Konqueror&&(this.Browser_Agt.indexOf('Netscape6')==-1);
this.Browser_Overlays = this.Browser_IE5point5plus;
this.Browser_Hideselects = this.Browser_IE&&!this.Browser_IEmac;
this.Browser_Addeventhandlers = !this.Browser_IEmac;
this.Browser_Contextmenus = this.Browser_Addeventhandlers;
this.Browser_Noncustomcontextmenus = this.Browser_Contextmenus&&!this.Browser_Opera&&!this.Browser_Safari;
this.Browser_Expandonclick = this.Browser_Addeventhandlers;
this.Browser_Recyclegroups = !this.Browser_IEmac;
}
function FiltersManage()
{
this.FilterArray=[];
this.IsEnabled= true;
}
FiltersManage.prototype.SetChildFilterEnabled= function (enable)
{
for (var i=0; i<this.FilterArray.length; i++)
{
var filter=this.FilterArray[i];
if (filter.AllowEnabled)
{
filter.IsEnabled=enable;
}
}
} ;
FiltersManage.prototype.SetEnabled= function (flag)
{
this.IsEnabled=false;
} ;
FiltersManage.prototype.Clear= function ()
{
this.FilterArray=[];
} ;
FiltersManage.prototype.Add= function (filter)
{
AddArrayListAtLast(this.FilterArray, filter);
} ;
FiltersManage.prototype.AddAt= function (filter,index)
{
this.FilterArray.splice(index,0,filter);
} ;
FiltersManage.prototype.Splice= function (index)
{
return this.FilterArray.splice(index,1);
} ;
FiltersManage.prototype.GetFilterByIndex= function (index)
{
return this.FilterArray[index];
} ;
FiltersManage.prototype.GetDesignContent= function (html)
{
if (!this.IsEnabled)
{
return html;
}
var content=html;
for (var i=0; i<this.FilterArray.length; i++)
{
var filter=this.FilterArray[i];
if (( false != filter.IsEnabled)&&filter.GetDesignContent)
{
content=filter.GetDesignContent(content);
}
}
return content;
} ;
FiltersManage.prototype.GetHtmlContent= function (html)
{
if (!this.IsEnabled)
{
return html;
}
var content=html;
for (var i=0; i<this.FilterArray.length; i++)
{
var filter=this.FilterArray[i];
if (( false != filter.IsEnabled)&&filter.GetHtmlContent)
{
content=filter.GetHtmlContent(content);
}
}
return content;
} ;
FiltersManage.prototype.GetPreviewContent= function (html)
{
if (!this.IsEnabled)
{
return html;
}
var content=html;
for (var i=0; i<this.FilterArray.length; i++)
{
var filter=this.FilterArray[i];
if (( false != filter.IsEnabled)&&filter.GetPreviewContent)
{
content=filter.GetPreviewContent(content);
}
}
return content;
} ;
function TagsNameToLowerFilter()
{
this.AllowEnabled= true;
this.Name="WebHtmlEditorTagsNameToLower";
this.GetDesignContent=null;
this.GetPreviewContent=null;
}
TagsNameToLowerFilter.prototype.GetHtmlContent = function(html)
{
if (!document.all)
{
return html;
}
var regx=/<\/?([A-Z][A-Z0-9]*)/g;
tempStr=html;
var macth=null;
var returnStr="";
var index=0;
try
{
while ((macth=regx.exec(tempStr)) != null)
{
var tempValue=macth[0];
returnStr+=tempStr.substring(index,regx.lastIndex-tempValue.length);
returnStr+=tempValue.toLowerCase();
index=regx.lastIndex;
}
if (index<tempStr.length)
{
returnStr+=tempStr.substring(index);
}
}
catch (e){ ; } ;
if (returnStr)
{
return returnStr;
}
else
{
return html;
}
}
function ConvertHtmlToXhtmlFilter()
{
this.Name="WebHtmlEditorConvertHtmlToXhtmlFilter";
this.AllowEnabled= true;
this.Name="Converts HTML to XHTML";
}
ConvertHtmlToXhtmlFilter.prototype.GetHtmlContent= function (html)
{
var oDiv=document.createElement("DIV");
oDiv.innerHTML=html;
var xhtml=this.XHtmlEncode(oDiv);
return xhtml.substring(5,xhtml.length-6);
}
ConvertHtmlToXhtmlFilter.prototype.XHtmlEncode= function (elem)
{
var stackObject=new ConvertHtmlToXhtmlFilterStack();
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -