1/** 2 * umeditor宿´é 置项 3 * å¯ä»¥å¨è¿éé ç½®æ´ä¸ªç¼è¾å¨çç¹æ§ 4 */ 5/**************************æç¤º******************************** 6 * ææè¢«æ³¨éçé 置项å为UEditoré»è®¤å¼ã 7 * ä¿®æ¹é»è®¤é 置请é¦å ç¡®ä¿å·²ç»å®å ¨æç¡®è¯¥åæ°ççå®ç¨éã 8 * ä¸»è¦æä¸¤ç§ä¿®æ¹æ¹æ¡ï¼ä¸ç§æ¯åæ¶æ¤å¤æ³¨éï¼ç¶åä¿®æ¹æå¯¹åºåæ°ï¼å¦ä¸ç§æ¯å¨å®ä¾åç¼è¾å¨æ¶ä¼ å ¥å¯¹åºåæ°ã 9 * å½å级ç¼è¾å¨æ¶ï¼å¯ç´æ¥ä½¿ç¨æ§çé ç½®æä»¶æ¿æ¢æ°çé ç½®æä»¶,ä¸ç¨æ å¿æ§çé ç½®æä»¶ä¸å ç¼ºå°æ°åè½æéçåæ°è导è´èæ¬æ¥éã 10 **************************æç¤º********************************/ 11 12 13(function () { 14 /** 15 * ç¼è¾å¨èµæºæä»¶æ ¹è·¯å¾ãå®æè¡¨ç¤ºçå«ä¹æ¯ï¼ä»¥ç¼è¾å¨å®ä¾å页é¢ä¸ºå½åè·¯å¾ï¼æåç¼è¾å¨èµæºæä»¶ï¼å³dialogçæä»¶å¤¹ï¼çè·¯å¾ã 16 * é´äºå¾å¤åå¦å¨ä½¿ç¨ç¼è¾å¨çæ¶ååºç°çç§ç§è·¯å¾é®é¢ï¼æ¤å¤å¼ºç建议大家使ç¨"ç¸å¯¹äºç½ç«æ ¹ç®å½çç¸å¯¹è·¯å¾"è¿è¡é ç½®ã 17 * "ç¸å¯¹äºç½ç«æ ¹ç®å½çç¸å¯¹è·¯å¾"ä¹å°±æ¯ä»¥ææ å¼å¤´çå½¢å¦"/myProject/umeditor/"è¿æ ·çè·¯å¾ã 18 * 妿ç«ç¹ä¸æå¤ä¸ªä¸å¨åä¸å±çº§ç页é¢éè¦å®ä¾åç¼è¾å¨ï¼ä¸å¼ç¨äºåä¸UEditorçæ¶åï¼æ¤å¤çURLå¯è½ä¸éç¨äºæ¯ä¸ªé¡µé¢çç¼è¾å¨ã 19 * å æ¤ï¼UEditoræä¾äºé对ä¸å页é¢çç¼è¾å¨å¯åç¬é ç½®çæ ¹è·¯å¾ï¼å ·ä½æ¥è¯´ï¼å¨éè¦å®ä¾åç¼è¾å¨ç页颿顶é¨åä¸å¦ä¸ä»£ç å³å¯ãå½ç¶ï¼éè¦ä»¤æ¤å¤çURLçäºå¯¹åºçé ç½®ã 20 * window.UMEDITOR_HOME_URL = "/xxxx/xxxx/"; 21 */ 22 var URL = window.UMEDITOR_HOME_URL || (function(){ 23 24 function PathStack() { 25 26 this.documentURL = self.document.URL || self.location.href; 27 28 this.separator = '/'; 29 this.separatorPattern = /\\|\//g; 30 this.currentDir = './'; 31 this.currentDirPattern = /^[.]\/]/; 32 33 this.path = this.documentURL; 34 this.stack = []; 35 36 this.push( this.documentURL ); 37 38 } 39 40 PathStack.isParentPath = function( path ){ 41 return path === '..'; 42 }; 43 44 PathStack.hasProtocol = function( path ){ 45 return !!PathStack.getProtocol( path ); 46 }; 47 48 PathStack.getProtocol = function( path ){ 49 50 var protocol = /^[^:]*:\/*/.exec( path ); 51 52 return protocol ? protocol[0] : null; 53 54 }; 55 56 PathStack.prototype = { 57 push: function( path ){ 58 59 this.path = path; 60 61 update.call( this ); 62 parse.call( this ); 63 64 return this; 65 66 }, 67 getPath: function(){ 68 return this + ""; 69 }, 70 toString: function(){ 71 return this.protocol + ( this.stack.concat( [''] ) ).join( this.separator ); 72 } 73 }; 74 75 function update() { 76 77 var protocol = PathStack.getProtocol( this.path || '' ); 78 79 if( protocol ) { 80 81 //æ ¹åè®® 82 this.protocol = protocol; 83 84 //local 85 this.localSeparator = /\\|\//.exec( this.path.replace( protocol, '' ) )[0]; 86 87 this.stack = []; 88 } else { 89 protocol = /\\|\//.exec( this.path ); 90 protocol && (this.localSeparator = protocol[0]); 91 } 92 93 } 94 95 function parse(){ 96 97 var parsedStack = this.path.replace( this.currentDirPattern, '' ); 98 99 if( PathStack.hasProtocol( this.path ) ) { 100 parsedStack = parsedStack.replace( this.protocol , ''); 101 } 102 103 parsedStack = parsedStack.split( this.localSeparator ); 104 parsedStack.length = parsedStack.length - 1; 105 106 for(var i= 0,tempPath,l=parsedStack.length,root = this.stack;i<l;i++){ 107 tempPath = parsedStack[i]; 108 if(tempPath){ 109 if( PathStack.isParentPath( tempPath ) ) { 110 root.pop();
111 } else { 112 root.push( tempPath ); 113 } 114 } 115 116 } 117 118 119 } 120 121 var currentPath = document.getElementsByTagName('script'); 122 123 currentPath = currentPath[ currentPath.length -1 ].src; 124 125 return new PathStack().push( currentPath ) + ""; 126 127 128 })(); 129 130 /** 131 * é 置项主ä½ã注æï¼æ¤å¤æææ¶åå°è·¯å¾çé ç½®å«éæ¼URLåéã 132 */ 133 window.UMEDITOR_CONFIG = { 134 135 //为ç¼è¾å¨å®ä¾æ·»å ä¸ä¸ªè·¯å¾ï¼è¿ä¸ªä¸è½è¢«æ³¨é 136 UMEDITOR_HOME_URL : URL 137 138 //å¾çä¸ä¼ é ç½®åº 139 ,imageUrl:URL+"php/imageUp.php" //å¾çä¸ä¼ æäº¤å°å 140 ,imagePath:URL + "php/" //å¾çä¿®æ£å°åï¼å¼ç¨äºfixedImagePath,å¦æç¹æ®éæ±ï¼å¯èªè¡é ç½® 141 ,imageFieldName:"upfile" //å¾çæ°æ®çkey,è¥æ¤å¤ä¿®æ¹ï¼éè¦å¨åå°å¯¹åºæä»¶ä¿®æ¹å¯¹åºåæ° 142 143 144 //å·¥å ·æ ä¸çææçåè½æé®å䏿æ¡ï¼å¯ä»¥å¨newç¼è¾å¨çå®ä¾æ¶éæ©èªå·±éè¦ç仿°å®ä¹ 145 ,toolbar:[ 146 'source | undo redo | bold italic underline strikethrough | superscript subscript | forecolor backcolor | removeformat |', 147 'insertorderedlist insertunorderedlist | selectall cleardoc paragraph | fontfamily fontsize' , 148 '| justifyleft justifycenter justifyright justifyjustify |', 149 'link unlink | emotion image insertvideo | map', 150 '| horizontal print preview fullscreen' 151 ] 152 153 //è¯è¨é 置项,é»è®¤æ¯zh-cnãæéè¦çè¯ä¹å¯ä»¥ä½¿ç¨å¦ä¸è¿æ ·çæ¹å¼æ¥èªå¨å¤è¯è¨åæ¢ï¼å½ç¶ï¼åææ¡ä»¶æ¯langæä»¶å¤¹ä¸åå¨å¯¹åºçè¯è¨æä»¶ï¼ 154 //langå¼ä¹å¯ä»¥éè¿èªå¨è·å (navigator.language||navigator.browserLanguage ||navigator.userLanguage).toLowerCase() 155 //,lang:"zh-cn" 156 //,langPath:URL +"lang/" 157 158 //ieä¸ç龿¥èªå¨çæµ 159 //,autourldetectinie:false 160 161 //主é¢é 置项,é»è®¤æ¯defaultãæéè¦çè¯ä¹å¯ä»¥ä½¿ç¨å¦ä¸è¿æ ·çæ¹å¼æ¥èªå¨å¤ä¸»é¢åæ¢ï¼å½ç¶ï¼åææ¡ä»¶æ¯themesæä»¶å¤¹ä¸åå¨å¯¹åºçä¸»é¢æä»¶ï¼ 162 //ç°æå¦ä¸ç®è¤:default 163 //,theme:'default' 164 //,themePath:URL +"themes/" 165 166 167 168 //é对getAllHtmlæ¹æ³ï¼ä¼å¨å¯¹åºçheadæ ç¾ä¸å¢å 该ç¼ç 设置ã 169 //,charset:"utf-8" 170 171 //常ç¨é ç½®é¡¹ç® 172 //,isShow : true //é»è®¤æ¾ç¤ºç¼è¾å¨ 173 174 //,initialContent:'欢è¿ä½¿ç¨UMEDITOR!' //åå§åç¼è¾å¨çå 容,ä¹å¯ä»¥éè¿textarea/scriptç»å¼ï¼çå®ç½ä¾å 175 176 //,initialFrameWidth:500 //åå§åç¼è¾å¨å®½åº¦,é»è®¤500 177 //,initialFrameHeight:500 //åå§åç¼è¾å¨é«åº¦,é»è®¤500 178 179 ,autoClearinitialContent:true //æ¯å¦èªå¨æ¸ é¤ç¼è¾å¨åå§å å®¹ï¼æ³¨æï¼å¦æfocus屿§è®¾ç½®ä¸ºtrue,è¿ä¸ªä¹ä¸ºçï¼é£ä¹ç¼è¾å¨ä¸ä¸æ¥å°±ä¼è§¦å导è´åå§åçå 容çä¸å°äº 180 181 //,textarea:'editorValue' // æäº¤è¡¨åæ¶ï¼æå¡å¨è·åç¼è¾å¨æäº¤å 容çæç¨çåæ°ï¼å¤å®ä¾æ¶å¯ä»¥ç»å®¹å¨name屿§ï¼ä¼å°nameç»å®çå¼æä¸ºæ¯ä¸ªå®ä¾çé®å¼ï¼ä¸ç¨æ¯æ¬¡å®ä¾åçæ¶åé½è®¾ç½®è¿ä¸ªå¼ 182 183 //,focus:false //åå§åæ¶ï¼æ¯å¦è®©ç¼è¾å¨è·å¾ç¦ç¹trueæfalse 184 185 //,autoClearEmptyNode : true //getContentæ¶ï¼æ¯å¦å é¤ç©ºçinlineElementèç¹ï¼å æ¬åµå¥çæ åµï¼ 186 187 //,fullscreen : false //æ¯å¦å¼å¯åå§åæ¶å³å ¨å±ï¼é»è®¤å ³é 188 189 //,readonly : false //ç¼è¾å¨åå§åç»æå,ç¼è¾åºåæ¯å¦æ¯åªè¯»çï¼é»è®¤æ¯false 190 191 //,zIndex : 900 //ç¼è¾å¨å±çº§çåºæ°,é»è®¤æ¯900 192 193 //妿èªå®ä¹ï¼æå¥½ç»pæ ç¾å¦ä¸çè¡é«ï¼è¦ä¸è¾å ¥ä¸ææ¶ï¼ä¼æè·³å¨æ 194 //注æè¿éæ·»å çæ ·å¼ï¼æå¥½æ¾å¨.edui-editor-body .edui-body-containerè¿ä¸¤ä¸ªçä¸è¾¹ï¼é²æ¢è·é¡µé¢ä¸csså²çª 195 //,initialStyle:'.edui-editor-body .edui-body-container p{line-height:1em}' 196 197 //,autoSyncData:true //èªå¨åæ¥ç¼è¾å¨è¦æäº¤çæ°æ® 198 199 //,emotionLocalization:false //æ¯å¦å¼å¯è¡¨æ æ¬å°åï¼é»è®¤å ³éãè¥è¦å¼å¯è¯·ç¡®ä¿emotionæä»¶å¤¹ä¸å å«å®ç½æä¾çimagesè¡¨æ æä»¶å¤¹ 200 201 //,allHtmlEnabled:false //æäº¤å°åå°çæ°æ®æ¯å¦å 嫿´ä¸ªhtmlå符串 202 203 //fontfamily 204 //åä½è®¾ç½® 205// ,'fontfamily':[ 206// { name: 'songti', val: 'å®ä½,SimSun'}, 207// ] 208 209 //fontsize 210 //åå·
211 //,'fontsize':[10, 11, 12, 14, 16, 18, 20, 24, 36] 212 213 //paragraph 214 //æ®µè½æ ¼å¼ å¼çç©ºæ¶æ¯æå¤è¯è¨èªå¨è¯å«ï¼è¥é ç½®ï¼å以é ç½®å¼ä¸ºå 215 //,'paragraph':{'p':'', 'h1':'', 'h2':'', 'h3':'', 'h4':'', 'h5':'', 'h6':''} 216 217 //undo 218 //å¯ä»¥æå¤åéçæ¬¡æ°,é»è®¤20 219 //,maxUndoCount:20 220 //å½è¾å ¥çå符æ°è¶ è¿è¯¥å¼æ¶ï¼ä¿å䏿¬¡ç°åº 221 //,maxInputCount:1 222 223 //imageScaleEnabled 224 // æ¯å¦å 许ç¹å»æä»¶ææ½æ¹å大å°,é»è®¤true 225 //,imageScaleEnabled:true 226 227 //dropFileEnabled 228 // æ¯å¦å è®¸ææ¾å¾çå°ç¼è¾åºåï¼ä¸ä¼ å¹¶æå ¥,é»è®¤true 229 //,dropFileEnabled:true 230 231 //autoHeightEnabled 232 // æ¯å¦èªå¨é¿é«,é»è®¤true 233 //,autoHeightEnabled:true 234 235 //autoFloatEnabled 236 //æ¯å¦ä¿ætoolbarçä½ç½®ä¸å¨,é»è®¤true 237 //,autoFloatEnabled:true 238 239 //æµ®å¨æ¶å·¥å ·æ è·ç¦»æµè§å¨é¡¶é¨çé«åº¦ï¼ç¨äºæäºå ·æåºå®å¤´é¨çé¡µé¢ 240 //,topOffset:30 241 242 //å¡«åè¿æ»¤è§å 243 //,filterRules: {} 244 }; 245})();
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.