Help.Web/editor/editor.js

(开头部分) 121KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

/***********************************************************
InnovaStudio WYSIWYG Editor 2.2
Copyright  2003-2005, INNOVA STUDIO (www.InnovaStudio.com). All rights reserved.
************************************************************/

/*** UTILITY OBJECT ***/

var oUtil=new InnovaEditorUtil();
function InnovaEditorUtil()	
    {
	/*** Localization ***/	
        this.langDir="schi";	
		try{
			if(LanguageDirectory)this.langDir=LanguageDirectory;
			}catch(e)
		{;}	
	var oScripts=document.getElementsByTagName("script");	
    for(var i=0;i<oScripts.length;i++)		
	   {		
        var sSrc=oScripts[i].src.toLowerCase();		
		if(sSrc.indexOf("scripts/editor.js")!=-1) 
		this.scriptPath=oScripts[i].src.replace(/editor.js/ig,"");		
		}	
		this.scriptPathLang=this.scriptPath+"language/"+this.langDir+"/";	
		if(this.langDir=="schi")
		document.write("<scr"+"ipt src='"+this.scriptPathLang+"editor_lang.js'></scr"+"ipt>");
	/*** /Localization ***/	
		this.oName;
		this.oEditor;
		this.obj;
		this.oSel;
		this.sType;
		this.bInside=bInside;
		this.useSelection=true;	
		this.arrEditor=[];	
		this.onSelectionChanged=function(){return true;};	
		this.activeElement;
	}

/*** FOCUS STUFF ***/
		
function bInside(oElement)
	{
	while(oElement!=null)
		{
		if(oElement.contentEditable=="true")return true;
		oElement=oElement.parentElement;
		}
	return false;
	}
function checkFocus()
	{
	var oEditor=eval("idContent"+this.oName);
	var oSel=oEditor.document.selection.createRange();
	var sType=oEditor.document.selection.type;

	if(oSel.parentElement!=null)
		{
		if(!bInside(oSel.parentElement()))return false;
		}
后面还有 3306 行代码,解锁后查看完整代码

24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明

AI 解读

登录后可用,每次 10 积分,解读结果公开显示在下面。

还没有人解读过这个文件。