Changeset 681
- Timestamp:
- 01/22/07 02:09:48 (6 years ago)
- Location:
- trunk/plugins
- Files:
-
- 20 modified
-
EnterParagraphs/enter-paragraphs.js (modified) (5 diffs)
-
Equation/equation.js (modified) (8 diffs)
-
Equation/popups/dialog.html (modified) (1 diff)
-
ExtendedFileManager/assets/images.js (modified) (1 diff)
-
ExtendedFileManager/assets/manager.js (modified) (5 diffs)
-
ExtendedFileManager/assets/popup.js (modified) (2 diffs)
-
ExtendedFileManager/backend.php (modified) (1 diff)
-
ExtendedFileManager/editor.php (modified) (1 diff)
-
ExtendedFileManager/editorFrame.php (modified) (1 diff)
-
ExtendedFileManager/extended-file-manager.js (modified) (13 diffs)
-
ExtendedFileManager/images.php (modified) (1 diff)
-
ExtendedFileManager/manager.php (modified) (1 diff)
-
InsertSnippet/insert-snippet.js (modified) (3 diffs)
-
InsertSnippet/popups/insertsnippet.html (modified) (4 diffs)
-
Linker/linker.js (modified) (1 diff)
-
SaveSubmit/save-submit.js (modified) (6 diffs)
-
SmartReplace/popups/dialog.html (modified) (1 diff)
-
SmartReplace/smart-replace.js (modified) (6 diffs)
-
SuperClean/super-clean.js (modified) (8 diffs)
-
SuperClean/tidy.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/plugins/EnterParagraphs/enter-paragraphs.js
r617 r681 4 4 * @fileoverview By Adam Wright, for The University of Western Australia 5 5 * 6 * Distributed under the same terms as HTMLArea itself.6 * Distributed under the same terms as Xinha itself. 7 7 * This notice MUST stay intact for use (see license.txt). 8 8 * … … 108 108 // gecko (Mozilla/FireFox) 109 109 110 if ( HTMLArea.is_gecko)110 if (Xinha.is_gecko) 111 111 { 112 112 //this.ddt._ddt( "enter-paragraphs.js","23", "EnterParagraphs(): we are gecko. Setting event handler." ); … … 783 783 784 784 // FIXME:/CHECKME: When Xinha is switched from WYSIWYG to text mode 785 // HTMLArea.getHTMLWrapper() will strip out the trailing br. Not sure why.785 // Xinha.getHTMLWrapper() will strip out the trailing br. Not sure why. 786 786 787 787 // fill.appendChild(editor._doc.createElement('br')); … … 964 964 // Grab the selection and associated range 965 965 966 var sel = this.editor. _getSelection();967 var rng = this.editor. _createRange(sel);966 var sel = this.editor.getSelection(); 967 var rng = this.editor.createRange(sel); 968 968 969 969 //this.ddt._ddtDumpNode( "enter-paragraphs.js", "757", "handleEnter(): initial range is: ", rng ); … … 1082 1082 this.editor.updateToolbar(); 1083 1083 1084 HTMLArea._stopEvent(ev);1084 Xinha._stopEvent(ev); 1085 1085 1086 1086 return true; -
trunk/plugins/Equation/equation.js
r677 r681 47 47 mathfontfamily = cfg.Equation.mathfontfamily; 48 48 49 //if ( HTMLArea.is_ie) return;50 if (! HTMLArea.is_ie)49 //if (Xinha.is_ie) return; 50 if (!Xinha.is_ie) 51 51 { 52 52 editor.notifyOn( 'modechange', … … 56 56 } 57 57 ); 58 HTMLArea.prependDom0Event (editor._textArea.form,'submit',function () {self.unParse();self.reParse = true});58 Xinha.prependDom0Event (editor._textArea.form,'submit',function () {self.unParse();self.reParse = true}); 59 59 } 60 60 61 61 if (typeof AMprocessNode != "function") 62 62 { 63 HTMLArea._loadback(_editor_url + "plugins/Equation/ASCIIMathML.js", function () { translate(); });63 Xinha._loadback(_editor_url + "plugins/Equation/ASCIIMathML.js", function () { translate(); }); 64 64 } 65 65 } 66 66 67 HTMLArea.Config.prototype.Equation =67 Xinha.Config.prototype.Equation = 68 68 { 69 69 "mathcolor" : "red", // change it to "" (to inherit) or any other color … … 85 85 Equation.prototype._lc = function(string) 86 86 { 87 return HTMLArea._lc(string, 'Equation');87 return Xinha._lc(string, 'Equation'); 88 88 }; 89 89 Equation.prototype.onGenerate = function() … … 93 93 Equation.prototype.onUpdateToolbar = function() 94 94 { 95 if (! HTMLArea.is_ie && this.reParse) AMprocessNode(this.editor._doc.body, false);95 if (!Xinha.is_ie && this.reParse) AMprocessNode(this.editor._doc.body, false); 96 96 }; 97 97 … … 112 112 Equation.prototype.parse = function () 113 113 { 114 if (! HTMLArea.is_ie)114 if (!Xinha.is_ie) 115 115 { 116 116 var doc = this.editor._doc; … … 149 149 args['editor'] = editor; 150 150 151 var parent = editor._getFirstAncestor(editor. _getSelection(),['span']);151 var parent = editor._getFirstAncestor(editor.getSelection(),['span']); 152 152 if (parent) 153 153 { … … 181 181 else if (!param["editedNode"] && formula != '') 182 182 { 183 if (! HTMLArea.is_ie)183 if (!Xinha.is_ie) 184 184 { 185 185 var span = document.createElement('span'); … … 194 194 } 195 195 } 196 if (! HTMLArea.is_ie) AMprocessNode(this.editor._doc.body, false);196 if (!Xinha.is_ie) AMprocessNode(this.editor._doc.body, false); 197 197 } 198 198 } -
trunk/plugins/Equation/popups/dialog.html
r677 r681 38 38 window.resizeTo(500, 300); 39 39 var showasciiformulaonhover = false; 40 HTMLArea = window.opener.HTMLArea;40 Xinha = window.opener.Xinha; 41 41 42 42 function i18n(str) { 43 return ( HTMLArea._lc(str, 'Equation'));43 return (Xinha._lc(str, 'Equation')); 44 44 } 45 45 function set (string) -
trunk/plugins/ExtendedFileManager/assets/images.js
r677 r681 10 10 11 11 function i18n(str) { 12 return HTMLArea._lc(str, 'ExtendedFileManager');12 return Xinha._lc(str, 'ExtendedFileManager'); 13 13 } 14 14 -
trunk/plugins/ExtendedFileManager/assets/manager.js
r677 r681 20 20 //Translation 21 21 function i18n(str) { 22 return HTMLArea._lc(str, 'ExtendedFileManager');22 return Xinha._lc(str, 'ExtendedFileManager'); 23 23 } 24 24 … … 50 50 if (manager_mode == "link") 51 51 { 52 var offsetForInputs = ( HTMLArea.is_ie) ? 155 : 140;52 var offsetForInputs = (Xinha.is_ie) ? 155 : 140; 53 53 } 54 54 else 55 55 { 56 var offsetForInputs = ( HTMLArea.is_ie) ? 220 : 200;56 var offsetForInputs = (Xinha.is_ie) ? 220 : 200; 57 57 } 58 58 init = function () … … 100 100 // (when the user alters the dimensions in the picker), clean that up 101 101 // so it looks right and we get back to a normal f_url 102 var rd = _resized_dir.replace( HTMLArea.RE_Specials, '\\$1');103 var rp = _resized_prefix.replace( HTMLArea.RE_Specials, '\\$1');102 var rd = _resized_dir.replace(Xinha.RE_Specials, '\\$1'); 103 var rp = _resized_prefix.replace(Xinha.RE_Specials, '\\$1'); 104 104 var dreg = new RegExp('^(.*/)' + rd + '/' + rp + '_([0-9]+)x([0-9]+)_([^/]+)$'); 105 105 … … 321 321 { 322 322 // Yup, need to resize 323 var resized = HTMLArea._geturlcontent(window.opener._editor_url + 'plugins/ExtendedFileManager/' + _backend_url + '&__function=resizer&img=' + encodeURIComponent(document.getElementById('f_url').value) + '&width=' + param.f_width + '&height=' + param.f_height);323 var resized = Xinha._geturlcontent(window.opener._editor_url + 'plugins/ExtendedFileManager/' + _backend_url + '&__function=resizer&img=' + encodeURIComponent(document.getElementById('f_url').value) + '&width=' + param.f_width + '&height=' + param.f_height); 324 324 325 325 // alert(resized); … … 529 529 function resize() 530 530 { 531 var win = HTMLArea.viewportSize(window);531 var win = Xinha.viewportSize(window); 532 532 document.getElementById('imgManager').style.height = win.y - 150 - offsetForInputs + 'px'; 533 533 -
trunk/plugins/ExtendedFileManager/assets/popup.js
r677 r681 24 24 var span = spans[i]; 25 25 if (span.firstChild && span.firstChild.data) { 26 var txt = HTMLArea._lc(span.firstChild.data, context);26 var txt = Xinha._lc(span.firstChild.data, context); 27 27 if (txt) 28 28 span.firstChild.data = txt; 29 29 } 30 30 if (span.title) { 31 var txt = HTMLArea._lc(span.title, context);31 var txt = Xinha._lc(span.title, context); 32 32 if (txt) 33 33 span.title = txt; 34 34 } 35 35 if (span.alt) { 36 var txt = HTMLArea._lc(span.alt, context);36 var txt = Xinha._lc(span.alt, context); 37 37 if (txt) 38 38 span.alt = txt; … … 40 40 } 41 41 } 42 document.title = HTMLArea._lc(document.title, context);42 document.title = Xinha._lc(document.title, context); 43 43 } 44 44 -
trunk/plugins/ExtendedFileManager/backend.php
r677 r681 10 10 * 11 11 * (c) DTLink, LLC 2005. 12 * Distributed under the same terms as HTMLArea itself.12 * Distributed under the same terms as Xinha itself. 13 13 * This notice MUST stay intact for use (see license.txt). 14 14 * -
trunk/plugins/ExtendedFileManager/editor.php
r677 r681 34 34 35 35 if(window.opener) 36 HTMLArea = window.opener.HTMLArea;36 Xinha = window.opener.Xinha; 37 37 /*]]>*/ 38 38 </script> -
trunk/plugins/ExtendedFileManager/editorFrame.php
r677 r681 31 31 32 32 if(window.top) 33 HTMLArea = window.top.HTMLArea;33 Xinha = window.top.Xinha; 34 34 35 35 function i18n(str) { 36 return HTMLArea._lc(str, 'ImageManager');36 return Xinha._lc(str, 'ImageManager'); 37 37 } 38 38 -
trunk/plugins/ExtendedFileManager/extended-file-manager.js
r677 r681 10 10 11 11 /** 12 * Installation example for ExtendedFileManager plugin.12 * For installation details see Readme.txt in the plugin folder 13 13 * 14 *15 * HTMLArea.loadPlugin("ExtendedFileManager");16 * HTMLArea.onload = function() {17 * var myeditor = new HTMLArea("textarea_id");18 * myeditor.registerPlugin(ExtendedFileManager);19 * myeditor.generate();20 * };21 * HTMLArea.init();22 *23 *24 * Then configure the config.inc.php file, that is all.25 */26 27 /**28 * It is pretty simple, this file over rides the HTMLArea.prototype._insertImage29 * function with our own, only difference is the popupDialog url30 * point that to the php script.31 14 */ 32 15 … … 43 26 cfg.registerButton({ 44 27 id : "linkfile", 45 tooltip : HTMLArea._lc("Insert File Link",'ExtendedFileManager'),28 tooltip : Xinha._lc("Insert File Link",'ExtendedFileManager'), 46 29 image : _editor_url + 'plugins/ExtendedFileManager/img/ed_linkfile.gif', 47 30 textMode : false, … … 62 45 }; 63 46 64 HTMLArea.Config.prototype.ExtendedFileManager =47 Xinha.Config.prototype.ExtendedFileManager = 65 48 { 66 49 'use_linker': true, … … 75 58 // Over ride the _insertImage function in htmlarea.js. 76 59 // Open up the ExtendedFileManger script instead. 77 HTMLArea.prototype._insertImage = function(image) {60 Xinha.prototype._insertImage = function(image) { 78 61 79 62 var editor = this; // for nested functions … … 87 70 if (image) { 88 71 outparam = { 89 f_url : HTMLArea.is_ie ? image.src : image.getAttribute("src"),72 f_url : Xinha.is_ie ? image.src : image.getAttribute("src"), 90 73 f_alt : image.alt, 91 74 f_title : image.title, … … 140 123 if (!img) { 141 124 if ( !param.f_url ) return false; 142 if ( HTMLArea.is_ie) {143 var sel = editor. _getSelection();144 var range = editor. _createRange(sel);125 if (Xinha.is_ie) { 126 var sel = editor.getSelection(); 127 var range = editor.createRange(sel); 145 128 editor._doc.execCommand("insertimage", false, param.f_url); 146 129 img = range.parentElement(); … … 205 188 }; 206 189 207 HTMLArea.prototype._linkFile = function(link) {190 Xinha.prototype._linkFile = function(link) { 208 191 209 192 var editor = this; … … 219 202 } 220 203 if (!link) { 221 var sel = editor. _getSelection();222 var range = editor. _createRange(sel);204 var sel = editor.getSelection(); 205 var range = editor.createRange(sel); 223 206 var compare = 0; 224 if ( HTMLArea.is_ie) {207 if (Xinha.is_ie) { 225 208 if ( sel.type == "Control" ) 226 209 compare = range.length; … … 231 214 } 232 215 if (compare == 0) { 233 alert( HTMLArea._lc("You must select some text before making a new link.", 'ExtendedFileManager'));216 alert(Xinha._lc("You must select some text before making a new link.", 'ExtendedFileManager')); 234 217 return; 235 218 } … … 243 226 } else 244 227 outparam = { 245 f_href : HTMLArea.is_ie ? link.href : link.getAttribute("href"),228 f_href : Xinha.is_ie ? link.href : link.getAttribute("href"), 246 229 f_title : link.title, 247 230 f_target : link.target, … … 277 260 editor._doc.execCommand("createlink", false, param.f_href); 278 261 a = editor.getParentElement(); 279 var sel = editor. _getSelection();280 var range = editor. _createRange(sel);281 if (! HTMLArea.is_ie) {262 var sel = editor.getSelection(); 263 var range = editor.createRange(sel); 264 if (!Xinha.is_ie) { 282 265 a = range.startContainer; 283 266 if (!/^a$/i.test(a.tagName)) { … … 339 322 var colorstring = ''; 340 323 for (var i = 0; i < colors.length; i++) { 341 colorstring += HTMLArea._colorToRgb(colors[i]);324 colorstring += Xinha._colorToRgb(colors[i]); 342 325 if (i + 1 < colors.length) 343 326 colorstring += " "; … … 346 329 } 347 330 348 return HTMLArea._colorToRgb(color);331 return Xinha._colorToRgb(color); 349 332 } -
trunk/plugins/ExtendedFileManager/images.php
r677 r681 264 264 265 265 if(window.top) 266 HTMLArea = window.top.HTMLArea;266 Xinha = window.top.Xinha; 267 267 268 268 function hideMessage() -
trunk/plugins/ExtendedFileManager/manager.php
r677 r681 86 86 87 87 if(window.opener) 88 HTMLArea = window.opener.HTMLArea;88 Xinha = window.opener.Xinha; 89 89 90 90 var thumbdir = "<?php echo $IMConfig['thumbnail_dir']; ?>"; -
trunk/plugins/InsertSnippet/insert-snippet.js
r677 r681 34 34 } 35 35 } 36 HTMLArea._getback(backend,function (getback) {eval(getback); self.snippets = snippets;});36 Xinha._getback(backend,function (getback) {eval(getback); self.snippets = snippets;}); 37 37 } 38 38 … … 56 56 57 57 InsertSnippet.prototype._lc = function(string) { 58 return HTMLArea._lc(string, 'InsertSnippet');58 return Xinha._lc(string, 'InsertSnippet'); 59 59 }; 60 60 … … 71 71 }; 72 72 73 HTMLArea.Config.prototype.InsertSnippet =73 Xinha.Config.prototype.InsertSnippet = 74 74 { 75 75 'snippets' : _editor_url+"plugins/InsertSnippet/demosnippets.js", // purely demo purposes, you should change this -
trunk/plugins/InsertSnippet/popups/insertsnippet.html
r677 r681 22 22 var snippets = config.snippets; 23 23 24 if ( config.pageStyle && ! HTMLArea.is_ie)24 if ( config.pageStyle && !Xinha.is_ie) 25 25 { 26 26 var style = document.createElement("style"); … … 55 55 if (config.InsertSnippet.showInsertVariable) 56 56 { 57 insertAsVariable = ' | <a href="javascript:onOK('+i+','+'\'variable\''+')">'+ HTMLArea._lc("Variable","InsertSnippet")+'</a>';57 insertAsVariable = ' | <a href="javascript:onOK('+i+','+'\'variable\''+')">'+Xinha._lc("Variable","InsertSnippet")+'</a>'; 58 58 } 59 59 var new_cell = trow.insertCell(0); 60 new_cell.innerHTML = snippet_name +': '+ HTMLArea._lc("Insert as","InsertSnippet")+' <a href="javascript:onOK('+i+','+'\'html\''+')">HTML</a>'+insertAsVariable + ' (<a id="show_preview'+i+'" href="javascript:preview(\'show\','+i+')">'+HTMLArea._lc("Show preview","InsertSnippet")+'</a>)<div id="preview'+i+'" style="display:none">'+snippets[i]['HTML']+'</div>';60 new_cell.innerHTML = snippet_name +': '+Xinha._lc("Insert as","InsertSnippet")+' <a href="javascript:onOK('+i+','+'\'html\''+')">HTML</a>'+insertAsVariable + ' (<a id="show_preview'+i+'" href="javascript:preview(\'show\','+i+')">'+Xinha._lc("Show preview","InsertSnippet")+'</a>)<div id="preview'+i+'" style="display:none">'+snippets[i]['HTML']+'</div>'; 61 61 new_cell.id = 'cell' + i; 62 62 … … 72 72 case 'show': 73 73 document.getElementById('preview'+i).style.display = 'block'; 74 show_preview_link.innerHTML = HTMLArea._lc("Hide preview","InsertSnippet");74 show_preview_link.innerHTML = Xinha._lc("Hide preview","InsertSnippet"); 75 75 show_preview_link.href = "javascript:preview('hide','"+i+"');"; 76 76 … … 78 78 case 'hide': 79 79 document.getElementById('preview'+i).style.display = 'none'; 80 show_preview_link.innerHTML = HTMLArea._lc("Show preview","InsertSnippet");80 show_preview_link.innerHTML = Xinha._lc("Show preview","InsertSnippet"); 81 81 show_preview_link.href = "javascript:preview('show','"+i+"');"; 82 82 break; -
trunk/plugins/Linker/linker.js
r677 r681 52 52 Linker.prototype._createLink = function(a) 53 53 { 54 if(!a && this.editor. _selectionEmpty(this.editor.getSelection()))54 if(!a && this.editor.selectionEmpty(this.editor.getSelection())) 55 55 { 56 56 alert(this._lc("You must select some text before making a new link.")); -
trunk/plugins/SaveSubmit/save-submit.js
r677 r681 30 30 31 31 SaveSubmit.prototype._lc = function(string) { 32 return HTMLArea._lc(string, 'SaveSubmit');32 return Xinha._lc(string, 'SaveSubmit'); 33 33 } 34 34 … … 47 47 var self = this; 48 48 var doc = this.editordoc = this.editor._iframe.contentWindow.document; 49 HTMLArea._addEvents(doc, ["mouseup","keyup","keypress","keydown"],49 Xinha._addEvents(doc, ["mouseup","keyup","keypress","keydown"], 50 50 function (event) { 51 return self.onEvent( HTMLArea.is_ie ? self.editor._iframe.contentWindow.event : event);51 return self.onEvent(Xinha.is_ie ? self.editor._iframe.contentWindow.event : event); 52 52 }); 53 53 } … … 55 55 SaveSubmit.prototype.onEvent = function(ev) { 56 56 57 var keyEvent = ( HTMLArea.is_ie && ev.type == "keydown") || (!HTMLArea.is_ie && ev.type == "keypress");57 var keyEvent = (Xinha.is_ie && ev.type == "keydown") || (!Xinha.is_ie && ev.type == "keypress"); 58 58 59 if (keyEvent && ev.ctrlKey && String.fromCharCode( HTMLArea.is_ie ? ev.keyCode : ev.charCode).toLowerCase() == 's') {59 if (keyEvent && ev.ctrlKey && String.fromCharCode(Xinha.is_ie ? ev.keyCode : ev.charCode).toLowerCase() == 's') { 60 60 this.save(this.editor); 61 61 } … … 111 111 } 112 112 113 HTMLArea._postback(editor._textArea.form.action, content, function(getback) {113 Xinha._postback(editor._textArea.form.action, content, function(getback) { 114 114 115 115 if (getback) { … … 128 128 if ( !document.getElementById("message_sub_" + textarea.name)) { return ; } 129 129 var elt = document.getElementById("message_sub_" + textarea.name); 130 elt.innerHTML = HTMLArea._lc(string, 'SaveSubmit');130 elt.innerHTML = Xinha._lc(string, 'SaveSubmit'); 131 131 } 132 132 … … 147 147 loading_message.style.width = htmlarea.offsetWidth +'px' ;//(this.editor._iframe.offsetWidth != 0) ? this.editor._iframe.offsetWidth +'px' : this.editor._initial_ta_size.w; 148 148 149 loading_message.style.left = HTMLArea.findPosX(htmlarea) + 'px';150 loading_message.style.top = ( HTMLArea.findPosY(htmlarea) + parseInt(htmlarea.offsetHeight) / 2) - 50 + 'px';149 loading_message.style.left = Xinha.findPosX(htmlarea) + 'px'; 150 loading_message.style.top = (Xinha.findPosY(htmlarea) + parseInt(htmlarea.offsetHeight) / 2) - 50 + 'px'; 151 151 152 152 var loading_main = document.createElement("div"); -
trunk/plugins/SmartReplace/popups/dialog.html
r677 r681 12 12 window.resizeTo(350, 200); 13 13 14 HTMLArea = window.opener.HTMLArea;14 Xinha = window.opener.Xinha; 15 15 16 16 function i18n(str) { 17 return ( HTMLArea._lc(str, 'SmartReplace'));17 return (Xinha._lc(str, 'SmartReplace')); 18 18 } 19 19 -
trunk/plugins/SmartReplace/smart-replace.js
r677 r681 35 35 36 36 SmartReplace.prototype._lc = function(string) { 37 return HTMLArea._lc(string, 'SmartReplace');37 return Xinha._lc(string, 'SmartReplace'); 38 38 }; 39 39 40 HTMLArea.Config.prototype.SmartReplace =40 Xinha.Config.prototype.SmartReplace = 41 41 { 42 42 'defaultActive' : true, … … 65 65 66 66 var self = this; 67 HTMLArea._addEvents(67 Xinha._addEvents( 68 68 self.editor._doc, 69 69 [ "keypress"], 70 70 function (event) 71 71 { 72 return self.keyEvent( HTMLArea.is_ie ? self.editor._iframe.contentWindow.event : event);72 return self.keyEvent(Xinha.is_ie ? self.editor._iframe.contentWindow.event : event); 73 73 }); 74 74 … … 103 103 if ( !this.active) return true; 104 104 var editor = this.editor; 105 var charCode = HTMLArea.is_ie ? ev.keyCode : ev.charCode;105 var charCode = Xinha.is_ie ? ev.keyCode : ev.charCode; 106 106 107 107 var key = String.fromCharCode(charCode); … … 113 113 if ( key == '"' || key == "'") 114 114 { 115 HTMLArea._stopEvent(ev);115 Xinha._stopEvent(ev); 116 116 return this.smartQuotes(key); 117 117 } … … 134 134 var editor = this.editor; 135 135 136 var sel = editor. _getSelection();137 138 if ( HTMLArea.is_ie)139 { 140 var r = editor. _createRange(sel);136 var sel = editor.getSelection(); 137 138 if (Xinha.is_ie) 139 { 140 var r = editor.createRange(sel); 141 141 if (r.text !== '') 142 142 { … … 180 180 { 181 181 var editor = this.editor; 182 var sel = this.editor. _getSelection();183 if ( HTMLArea.is_ie)184 { 185 var r = this.editor. _createRange(sel);182 var sel = this.editor.getSelection(); 183 if (Xinha.is_ie) 184 { 185 var r = this.editor.createRange(sel); 186 186 r.moveStart('character', -2); 187 187 -
trunk/plugins/SuperClean/super-clean.js
r560 r681 24 24 25 25 SuperClean.prototype._lc = function(string) { 26 return HTMLArea._lc(string, 'SuperClean');26 return Xinha._lc(string, 'SuperClean'); 27 27 }; 28 28 … … 59 59 if(opts.tidy) 60 60 { 61 HTMLArea._postback(editor.config.SuperClean.tidy_handler, {'content' : editor.getInnerHTML()},61 Xinha._postback(editor.config.SuperClean.tidy_handler, {'content' : editor.getInnerHTML()}, 62 62 function(javascriptResponse) { eval(javascriptResponse) }); 63 63 } … … 92 92 }; 93 93 94 HTMLArea.Config.prototype.SuperClean =94 Xinha.Config.prototype.SuperClean = 95 95 { 96 96 // set to the URL of a handler for html tidy, this handler … … 107 107 // filterFunction in the second format above is optional. 108 108 109 'filters': { 'tidy': HTMLArea._lc('General tidy up and correction of some problems.', 'SuperClean'),110 'word_clean': HTMLArea._lc('Clean bad HTML from Microsoft Word', 'SuperClean'),111 'remove_faces': HTMLArea._lc('Remove custom typefaces (font "styles").', 'SuperClean'),112 'remove_sizes': HTMLArea._lc('Remove custom font sizes.', 'SuperClean'),113 'remove_colors': HTMLArea._lc('Remove custom text colors.', 'SuperClean'),114 'remove_lang': HTMLArea._lc('Remove lang attributes.', 'SuperClean'),115 'remove_fancy_quotes': {label: HTMLArea._lc('Replace directional quote marks with non-directional quote marks.', 'SuperClean'), checked:false}109 'filters': { 'tidy': Xinha._lc('General tidy up and correction of some problems.', 'SuperClean'), 110 'word_clean': Xinha._lc('Clean bad HTML from Microsoft Word', 'SuperClean'), 111 'remove_faces': Xinha._lc('Remove custom typefaces (font "styles").', 'SuperClean'), 112 'remove_sizes': Xinha._lc('Remove custom font sizes.', 'SuperClean'), 113 'remove_colors': Xinha._lc('Remove custom text colors.', 'SuperClean'), 114 'remove_lang': Xinha._lc('Remove lang attributes.', 'SuperClean'), 115 'remove_fancy_quotes': {label:Xinha._lc('Replace directional quote marks with non-directional quote marks.', 'SuperClean'), checked:false} 116 116 //additional custom filters (defined in plugins/SuperClean/filters/word.js) 117 117 //'paragraph': 'remove paragraphs'}, … … 171 171 SuperClean.filterFunctions.tidy = function(html, editor) 172 172 { 173 HTMLArea._postback(editor.config.SuperClean.tidy_handler, {'content' : html},173 Xinha._postback(editor.config.SuperClean.tidy_handler, {'content' : html}, 174 174 function(javascriptResponse) { eval(javascriptResponse) }); 175 175 }; … … 207 207 else 208 208 { 209 HTMLArea._getback(_editor_url + 'plugins/SuperClean/filters/'+filter+'.js',209 Xinha._getback(_editor_url + 'plugins/SuperClean/filters/'+filter+'.js', 210 210 function(func) { 211 211 eval('SuperClean.filterFunctions.'+filter+'='+func+';'); … … 244 244 if(this.html == false) 245 245 { 246 HTMLArea._getback(_editor_url + 'plugins/SuperClean/dialog.html', function(txt) { lDialog.html = txt; lDialog._prepareDialog(); });246 Xinha._getback(_editor_url + 'plugins/SuperClean/dialog.html', function(txt) { lDialog.html = txt; lDialog._prepareDialog(); }); 247 247 return; 248 248 } … … 270 270 271 271 // Now we have everything we need, so we can build the dialog. 272 var dialog = this.dialog = new HTMLArea.Dialog(SuperClean.editor, this.html, 'SuperClean');272 var dialog = this.dialog = new Xinha.Dialog(SuperClean.editor, this.html, 'SuperClean'); 273 273 274 274 this.ready = true; -
trunk/plugins/SuperClean/tidy.php
r284 r681 1 1 <?php 2 /** This PHP file is intended for use with XMLHTTPRequest from an HTMLArea3 * it requrns javascript to set the htmlarea html with tidied html that is2 /** This PHP file is intended for use with XMLHTTPRequest from Xinha 3 * it requrns javascript to set the Xinha html with tidied html that is 4 4 * submitted in a $_POST parameter called 'content' 5 5 */
