/*
Copyright (c) 2003-2011, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
(function(){
if(!window.CKEDITOR)window.CKEDITOR=(function(){
var a={
timestamp:'B1GG4Z6',version:'3.5.2',revision:'6450',_:{
},status:'unloaded',basePath:(function(){
var d=window.CKEDITOR_BASEPATH||'';if(!d){
var e=document.getElementsByTagName('script');for(var f=0;f
var g=e[f].src.match(/(^|.*[\\\/])ckeditor(?:_basic)?(?:_source)?.js(?:\?.*)?$/i);if(g){
d=g[1];break;
}
}
}if(d.indexOf(':/')==-1)if(d.indexOf('/')===0)d=location.href.match(/^.*?:\/\/[^\/]*/)[0]+d;else d=location.href.match(/^[^\?]*\/(?:)/)[0]+d;if(!d)throw 'The CKEditor installation path could not be automatically detected. Please set the global variable "CKEDITOR_BASEPATH" before creating editor instances.';return d;
})(),getUrl:function(d){
if(d.indexOf(':/')==-1&&d.indexOf('/')!==0)d=this.basePath+d;if(this.timestamp&&d.charAt(d.length-1)!='/'&&!/[&?]t=/.test(d))d+=(d.indexOf('?')>=0?'&':'?')+'t='+this.timestamp;return d;
}
},b=window.CKEDITOR_GETURL;if(b){
var c=a.getUrl;a.getUrl=function(d){
return b.call(a,d)||c.call(a,d);
};
}return a;
})();var a=CKEDITOR;if(!a.event){
a.event=function(){
};a.event.implementOn=function(b){
var c=a.event.prototype;for(var d in c){
if(b[d]==undefined)b[d]=c[d];
}
};a.event.prototype=(function(){
var b=function(d){
var e=d.getPrivate&&d.getPrivate()||d._||(d._={
});return e.events||(e.events={
});
},c=function(d){
this.name=d;this.listeners=[];
};c.prototype={
getListenerIndex:function(d){
for(var e=0,f=this.listeners;e
if(f[e].fn==d)return e;
}return-1;
}
};return{
on:function(d,e,f,g,h){
var i=b(this),j=i[d]||(i[d]=new c(d));if(j.getListenerIndex(e)<0){
var k=j.listeners;if(!f)f=this;if(isNaN(h))h=10;var l=this,m=function(o,p,q,r){
var s={
name:d,sender:this,editor:o,data:p,listenerData:g,stop:q,cancel:r,removeListener:function(){
l.removeListener(d,e);
}
};e.call(f,s);return s.data;
};m.fn=e;m.priority=h;for(var n=k.length-1;n>=0;n--){
if(k[n].priority<=h){
k.splice(n+1,0,m);return;
}
}k.unshift(m);
}
},fire:(function(){
var d=false,e=function(){
d=true;
},f=false,g=function(){
f=true;
};return function(h,i,j){
var k=b(this)[h],l=d,m=f;d=f=false;if(k){
var n=k.listeners;if(n.length){
n=n.slice(0);for(var o=0;o
var p=n[o].call(this,j,i,e,g);if(typeof p!='undefined')i=p;if(d||f)break;
}
}
}var q=f||(typeof i=='undefined'?false:i);d=l;f=m;return q;
};
})(),fireOnce:function(d,e,f){
var g=this.fire(d,e,f);delete b(this)[d];return g;
},removeListener:function(d,e){
var f=b(this)[d];if(f){
var g=f.getListenerIndex(e);if(g>=0)f.listeners.splice(g,1);
}
},hasListeners:function(d){
var e=b(this)[d];
return e&&e.listeners.length>0;
}
};
})();
}if(!a.editor){
a.ELEMENT_MODE_NONE=0;a.ELEMENT_MODE_REPLACE=1;a.ELEMENT_MODE_APPENDTO=2;a.editor=function(b,c,d,e){
var f=this;f._={
instanceConfig:b,element:c,data:e
};f.elementMode=d||0;a.event.call(f);f._init();
};a.editor.replace=function(b,c){
var d=b;if(typeof d!='object'){
d=document.getElementById(b);if(d&&d.tagName.toLowerCase() in {
style:1,script:1,base:1,link:1,meta:1,title:1
})d=null;if(!d){
var e=0,f=document.getElementsByName(b);while((d=f[e++])&&d.tagName.toLowerCase()!='textarea'){
}
}if(!d)throw '[CKEDITOR.editor.replace] The element with id or name "'+b+'" was not found.';
}d.style.visibility='hidden';return new a.editor(c,d,1);
};a.editor.appendTo=function(b,c,d){
var e=b;if(typeof e!='object'){
e=document.getElementById(b);if(!e)throw '[CKEDITOR.editor.appendTo] The element with id "'+b+'" was not found.';
}return new a.editor(c,e,2,d);
};a.editor.prototype={
_init:function(){
var b=a.editor._pending||(a.editor._pending=[]);b.push(this);
},fire:function(b,c){
return a.event.prototype.fire.call(this,b,c,this);
},fireOnce:function(b,c){
return a.event.prototype.fireOnce.call(this,b,c,this);
}
};a.event.implementOn(a.editor.prototype,true);
}if(!a.env)a.env=(function(){
var b=navigator.userAgent.toLowerCase(),c=window.opera,d={
ie:/*@cc_on!@*/false,opera:!!c&&c.version,webkit:b.indexOf(' applewebkit/')>-1,air:b.indexOf(' adobeair/')>-1,mac:b.indexOf('macintosh')>-1,quirks:document.compatMode=='BackCompat',mobile:b.indexOf('mobile')>-1,isCustomDomain:function(){
if(!this.ie)return false;var g=document.domain,h=window.location.hostname;return g!=h&&g!='['+h+']';
}
};d.gecko=navigator.product=='Gecko'&&!d.webkit&&!d.opera;var e=0;if(d.ie){
e=parseFloat(b.match(/msie (\d+)/)[1]);d.ie8=!!document.documentMode;d.ie8Compat=document.documentMode==8;d.ie7Compat=e==7&&!document.documentMode||document.documentMode==7;d.ie6Compat=e<7||d.quirks;
}if(d.gecko){
var f=b.match(/rv:([\d\.]+)/);if(f){
f=f[1].split('.');e=f[0]*10000+(f[1]||0)*100+ +(f[2]||0);
}
}if(d.opera)e=parseFloat(c.version());if(d.air)e=parseFloat(b.match(/ adobeair\/(\d+)/)[1]);if(d.webkit)e=parseFloat(b.match(/ applewebkit\/(\d+)/)[1]);d.version=e;d.isCompatible=!d.mobile&&(d.ie&&e>=6||d.gecko&&e>=10801||d.opera&&e>=9.5||d.air&&e>=1||d.webkit&&e>=522||false);d.cssClass='cke_browser_'+(d.ie?'ie':d.gecko?'gecko':d.opera?'opera':d.webkit?'webkit':'unknown');if(d.quirks)d.cssClass+=' cke_browser_quirks';if(d.ie){
d.cssClass+=' cke_browser_ie'+(d.version<7?'6':d.version>=8?document.documentMode:'7');
if(d.quirks)d.cssClass+=' cke_browser_iequirks';
}if(d.gecko&&e<10900)d.cssClass+=' cke_browser_gecko18';if(d.air)d.cssClass+=' cke_browser_air';return d;
})();var b=a.env;var c=b.ie;if(a.status=='unloaded')(function(){
a.event.implementOn(a);a.loadFullCore=function(){
if(a.status!='basic_ready'){
a.loadFullCore._load=1;return;
}delete a.loadFullCore;var e=document.createElement('script');e.type='text/javascript';e.src=a.basePath+'ckeditor.js';document.getElementsByTagName('head')[0].appendChild(e);
};a.loadFullCoreTimeout=0;a.replaceClass='ckeditor';a.replaceByClassEnabled=1;var d=function(e,f,g,h){
if(b.isCompatible){
if(a.loadFullCore)a.loadFullCore();var i=g(e,f,h);a.add(i);return i;
}return null;
};a.replace=function(e,f){
return d(e,f,a.editor.replace);
};a.appendTo=function(e,f,g){
return d(e,f,a.editor.appendTo,g);
};a.add=function(e){
var f=this._.pending||(this._.pending=[]);f.push(e);
};a.replaceAll=function(){
var e=document.getElementsByTagName('textarea');for(var f=0;f
var g=null,h=e[f],i=h.name;if(!h.name&&!h.id)continue;if(typeof arguments[0]=='string'){
var j=new RegExp('(?:^|\\s)'+arguments[0]+'(?:$|\\s)');if(!j.test(h.className))continue;
}else if(typeof arguments[0]=='function'){
g={
};if(arguments[0](h,g)===false)continue;
}this.replace(h,g);
}
};(function(){
var e=function(){
var f=a.loadFullCore,g=a.loadFullCoreTimeout;if(a.replaceByClassEnabled)a.replaceAll(a.replaceClass);a.status='basic_ready';if(f&&f._load)f();else if(g)setTimeout(function(){
if(a.loadFullCore)a.loadFullCore();
},g*1000);
};if(window.addEventListener)window.addEventListener('load',e,false);else if(window.attachEvent)window.attachEvent('onload',e);
})();a.status='basic_loaded';
})();a.dom={
};var d=a.dom;(function(){
var e=[];a.on('reset',function(){
e=[];
});a.tools={
arrayCompare:function(f,g){
if(!f&&!g)return true;if(!f||!g||f.length!=g.length)return false;for(var h=0;h
if(f[h]!=g[h])return false;
}return true;
},clone:function(f){
var g;if(f&&f instanceof Array){
g=[];for(var h=0;h
}if(f===null||typeof f!='object'||f instanceof String||f instanceof Number||f instanceof Boolean||f instanceof Date||f instanceof RegExp)return f;g=new f.constructor();for(var i in f){
var j=f[i];g[i]=this.clone(j);
}return g;
},capitalize:function(f){
return f.charAt(0).toUpperCase()+f.substring(1).toLowerCase();
},extend:function(f){
var g=arguments.length,h,i;if(typeof (h=arguments[g-1])=='boolean')g--;else if(typeof (h=arguments[g-2])=='boolean'){
i=arguments[g-1];
g-=2;
}for(var j=1;j
var k=arguments[j];for(var l in k){
if(h===true||f[l]==undefined)if(!i||l in i)f[l]=k[l];
}
}return f;
},prototypedCopy:function(f){
var g=function(){
};g.prototype=f;return new g();
},isArray:function(f){
return!!f&&f instanceof Array;
},isEmpty:function(f){
for(var g in f){
if(f.hasOwnProperty(g))return false;
}return true;
},cssStyleToDomStyle:(function(){
var f=document.createElement('div').style,g=typeof f.cssFloat!='undefined'?'cssFloat':typeof f.styleFloat!='undefined'?'styleFloat':'float';return function(h){
if(h=='float')return g;else return h.replace(/-./g,function(i){
return i.substr(1).toUpperCase();
});
};
})(),buildStyleHtml:function(f){
f=[].concat(f);var g,h=[];for(var i=0;i
g=f[i];if(/@import|[{
}]/.test(g))h.push('');else h.push('');
}return h.join('');
},htmlEncode:function(f){
var g=function(k){
var l=new d.element('span');l.setText(k);return l.getHtml();
},h=g('\n').toLowerCase()=='
'?function(k){
return g(k).replace(/
/gi,'\n');
}:g,i=g('>')=='>'?function(k){
return h(k).replace(/>/g,'>');
}:h,j=g(' ')==' '?function(k){
return i(k).replace(/ /g,' ');
}:i;this.htmlEncode=j;return this.htmlEncode(f);
},htmlEncodeAttr:function(f){
return f.replace(/"/g,'"').replace(/
/g,'>');},getNextNumber:(function(){
var f=0;return function(){
return++f;
};
})(),getNextId:function(){
return 'cke_'+this.getNextNumber();
},override:function(f,g){
return g(f);
},setTimeout:function(f,g,h,i,j){
if(!j)j=window;if(!h)h=j;return j.setTimeout(function(){
if(i)f.apply(h,[].concat(i));else f.apply(h);
},g||0);
},trim:(function(){
var f=/(?:^[ \t\n\r]+)|(?:[ \t\n\r]+$)/g;return function(g){
return g.replace(f,'');
};
})(),ltrim:(function(){
var f=/^[ \t\n\r]+/g;return function(g){
return g.replace(f,'');
};
})(),rtrim:(function(){
var f=/[ \t\n\r]+$/g;return function(g){
return g.replace(f,'');
};
})(),indexOf:Array.prototype.indexOf?function(f,g){
return f.indexOf(g);
}:function(f,g){
for(var h=0,i=f.length;h
if(f[h]===g)return h;
}return-1;
},bind:function(f,g){
return function(){
return f.apply(g,arguments);
};
},createClass:function(f){
var g=f.$,h=f.base,i=f.privates||f._,j=f.proto,k=f.statics;if(i){
var l=g;g=function(){
var p=this;var m=p._||(p._={
});for(var n in i){
var o=i[n];m[n]=typeof o=='function'?a.tools.bind(o,p):o;
}l.apply(p,arguments);
};
}if(h){
g.prototype=this.prototypedCopy(h.prototype);g.prototype['constructor']=g;g.prototype.base=function(){
this.base=h.prototype.base;
h.apply(this,argumen
...
...
(文件超长,未完全显示,请下载后阅读剩余部分)
...
展开> <收缩