Index: openacs-4/packages/acs-templating/www/resources/xinha-nightly/Xinha.css =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/www/resources/xinha-nightly/Xinha.css,v diff -u -N -r1.1 -r1.2 --- openacs-4/packages/acs-templating/www/resources/xinha-nightly/Xinha.css 2 Feb 2007 21:04:44 -0000 1.1 +++ openacs-4/packages/acs-templating/www/resources/xinha-nightly/Xinha.css 25 Feb 2007 19:06:05 -0000 1.2 @@ -1,4 +1,4 @@ -.htmlarea { background: #fff; margin:2px; } +.htmlarea { background: #fff; } .htmlarea .toolbar { cursor: default; @@ -86,6 +86,7 @@ background-color: ButtonFace; color: ButtonText; font: 11px Tahoma,Verdana,sans-serif; + height:16px; } .htmlarea .statusBar .statusBarTree a { Index: openacs-4/packages/acs-templating/www/resources/xinha-nightly/XinhaCore.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/www/resources/xinha-nightly/XinhaCore.js,v diff -u -N -r1.1 -r1.2 --- openacs-4/packages/acs-templating/www/resources/xinha-nightly/XinhaCore.js 2 Feb 2007 21:04:44 -0000 1.1 +++ openacs-4/packages/acs-templating/www/resources/xinha-nightly/XinhaCore.js 25 Feb 2007 19:06:05 -0000 1.2 @@ -1,5758 +1,3473 @@ - - /*--------------------------------------:noTabs=true:tabSize=2:indentSize=2:-- - -- Xinha (is not htmlArea) - http://xinha.gogo.co.nz/ - -- - -- Use of Xinha is granted by the terms of the htmlArea License (based on - -- BSD license) please read license.txt in this package for details. - -- - -- Xinha was originally based on work by Mihai Bazon which is: - -- Copyright (c) 2003-2004 dynarch.com. - -- Copyright (c) 2002-2003 interactivetools.com, inc. - -- This copyright notice MUST stay intact for use. - -- - -- Developers - Coding Style: - -- For the sake of not committing needlessly conflicting changes, - -- - -- * New code to be indented with 2 spaces ("soft tab"). - -- * New code preferably uses BSD-Style Bracing - -- if ( foo ) - -- { - -- bar(); - -- } - -- * Don't change brace styles unless you're working on the non BSD-Style - -- area (so we don't get spurious changes in line numbering). - -- * Don't change indentation unless you're working on the badly indented - -- area (so we don't get spurious changes of large blocks of code). - -- * Jedit is the recommended editor, a comment of this format should be - -- included in the top 10 lines of the file (see the embedded edit mode) - -- - -- $HeadURL: http://svn.xinha.python-hosting.com/trunk/XinhaCore.js $ - -- $LastChangedDate: 2007-01-31 02:09:44 +1300 (Wed, 31 Jan 2007) $ - -- $LastChangedRevision: 707 $ - -- $LastChangedBy: ray $ - --------------------------------------------------------------------------*/ +Xinha.version={"Release":"Trunk","Head":"$HeadURL: http://svn.xinha.python-hosting.com/tags/0.92beta/XinhaCore.js $".replace(/^[^:]*: (.*) \$$/,"$1"),"Date":"$LastChangedDate: 2007-02-22 02:11:56 +0100 (Do, 22 Feb 2007) $".replace(/^[^:]*: ([0-9-]*) ([0-9:]*) ([+0-9]*) \((.*)\) \$/,"$4 $2 $3"),"Revision":"$LastChangedRevision: 757 $".replace(/^[^:]*: (.*) \$$/,"$1"),"RevisionBy":"$LastChangedBy: ray $".replace(/^[^:]*: (.*) \$$/,"$1")}; +Xinha._resolveRelativeUrl=function(_1,_2){ +if(_2.match(/^([^:]+\:)?\//)){ +return _2; +}else{ +var b=_1.split("/"); +if(b[b.length-1]==""){ +b.pop(); +} +var p=_2.split("/"); +if(p[0]=="."){ +p.shift(); +} +while(p[0]==".."){ +b.pop(); +p.shift(); +} +return b.join("/")+"/"+p.join("/"); +} +}; +if(typeof _editor_url=="string"){ +_editor_url=_editor_url.replace(/\x2f*$/,"/"); +if(!_editor_url.match(/^([^:]+\:)?\//)){ +var path=window.location.toString().split("/"); +path.pop(); +_editor_url=Xinha._resolveRelativeUrl(path.join("/"),_editor_url); +} +}else{ +alert("WARNING: _editor_url is not set! You should set this variable to the editor files path; it should preferably be an absolute path, like in '/htmlarea/', but it can be relative if you prefer. Further we will try to load the editor files correctly but we'll probably fail."); +_editor_url=""; +} +if(typeof _editor_lang=="string"){ +_editor_lang=_editor_lang.toLowerCase(); +}else{ +_editor_lang="en"; +} +if(typeof _editor_skin!=="string"){ +_editor_skin=""; +} +var __xinhas=[]; +Xinha.agt=navigator.userAgent.toLowerCase(); +Xinha.is_ie=((Xinha.agt.indexOf("msie")!=-1)&&(Xinha.agt.indexOf("opera")==-1)); +Xinha.ie_version=parseFloat(Xinha.agt.substring(Xinha.agt.indexOf("msie")+5)); +Xinha.is_opera=(Xinha.agt.indexOf("opera")!=-1); +Xinha.is_mac=(Xinha.agt.indexOf("mac")!=-1); +Xinha.is_mac_ie=(Xinha.is_ie&&Xinha.is_mac); +Xinha.is_win_ie=(Xinha.is_ie&&!Xinha.is_mac); +Xinha.is_gecko=(navigator.product=="Gecko"); +Xinha.isRunLocally=document.URL.toLowerCase().search(/^file:/)!=-1; +if(Xinha.isRunLocally){ +alert("Xinha *must* be installed on a web server. Locally opened files (those that use the \"file://\" protocol) cannot properly function. Xinha will try to initialize but may not be correctly loaded."); +} +function Xinha(_5,_6){ +if(!_5){ +throw ("Tried to create Xinha without textarea specified."); +} +if(Xinha.checkSupportedBrowser()){ +if(typeof _6=="undefined"){ +this.config=new Xinha.Config(); +}else{ +this.config=_6; +} +this._htmlArea=null; +if(typeof _5!="object"){ +_5=Xinha.getElementById("textarea",_5); +} +this._textArea=_5; +this._textArea.spellcheck=false; +this._initial_ta_size={w:_5.style.width?_5.style.width:(_5.offsetWidth?(_5.offsetWidth+"px"):(_5.cols+"em")),h:_5.style.height?_5.style.height:(_5.offsetHeight?(_5.offsetHeight+"px"):(_5.rows+"em"))}; +if(this.config.showLoading){ +var _7=document.createElement("div"); +_7.id="loading_"+_5.name; +_7.className="loading"; +try{ +_7.style.width=_5.offsetWidth+"px"; +} +catch(ex){ +_7.style.width=this._initial_ta_size.w; +} +_7.style.left=Xinha.findPosX(_5)+"px"; +_7.style.top=(Xinha.findPosY(_5)+parseInt(this._initial_ta_size.h,10)/2)+"px"; +var _8=document.createElement("div"); +_8.className="loading_main"; +_8.id="loading_main_"+_5.name; +_8.appendChild(document.createTextNode(Xinha._lc("Loading in progress. Please wait !"))); +var _9=document.createElement("div"); +_9.className="loading_sub"; +_9.id="loading_sub_"+_5.name; +_9.appendChild(document.createTextNode(Xinha._lc("Constructing main object"))); +_7.appendChild(_8); +_7.appendChild(_9); +document.body.appendChild(_7); +this.setLoadingMessage("Constructing object"); +} +this._editMode="wysiwyg"; +this.plugins={}; +this._timerToolbar=null; +this._timerUndo=null; +this._undoQueue=[this.config.undoSteps]; +this._undoPos=-1; +this._customUndo=true; +this._mdoc=document; +this.doctype=""; +this.__htmlarea_id_num=__xinhas.length; +__xinhas[this.__htmlarea_id_num]=this; +this._notifyListeners={}; +var _a={right:{on:true,container:document.createElement("td"),panels:[]},left:{on:true,container:document.createElement("td"),panels:[]},top:{on:true,container:document.createElement("td"),panels:[]},bottom:{on:true,container:document.createElement("td"),panels:[]}}; +for(var i in _a){ +if(!_a[i].container){ +continue; +} +_a[i].div=_a[i].container; +_a[i].container.className="panels "+i; +Xinha.freeLater(_a[i],"container"); +Xinha.freeLater(_a[i],"div"); +} +this._panels=_a; +Xinha.freeLater(this,"_textArea"); +} +} +Xinha.onload=function(){ +}; +Xinha.init=function(){ +Xinha.onload(); +}; +Xinha.RE_tagName=/(<\/|<)\s*([^ \t\n>]+)/ig; +Xinha.RE_doctype=/()\n?/i; +Xinha.RE_head=/((.|\n)*?)<\/head>/i; +Xinha.RE_body=/]*>((.|\n|\r|\t)*?)<\/body>/i; +Xinha.RE_Specials=/([\/\^$*+?.()|{}[\]])/g; +Xinha.RE_email=/[_a-zA-Z\d\-\.]{3,}@[_a-zA-Z\d\-]{2,}(\.[_a-zA-Z\d\-]{2,})+/i; +Xinha.RE_url=/(https?:\/\/)?(([a-z0-9_]+:[a-z0-9_]+@)?[a-z0-9_-]{2,}(\.[a-z0-9_-]{2,}){2,}(:[0-9]+)?(\/\S+)*)/i; +Xinha.Config=function(){ +var _c=this; +this.version=Xinha.version.Revision; +this.width="auto"; +this.height="auto"; +this.sizeIncludesBars=true; +this.sizeIncludesPanels=true; +this.panel_dimensions={left:"200px",right:"200px",top:"100px",bottom:"100px"}; +this.statusBar=true; +this.htmlareaPaste=false; +this.mozParaHandler="best"; +this.getHtmlMethod="DOMwalk"; +this.undoSteps=20; +this.undoTimeout=500; +this.changeJustifyWithDirection=false; +this.fullPage=false; +this.pageStyle=""; +this.pageStyleSheets=[]; +this.baseHref=null; +this.expandRelativeUrl=true; +this.stripBaseHref=true; +this.stripSelfNamedAnchors=true; +this.only7BitPrintablesInURLs=true; +this.sevenBitClean=false; +this.specialReplacements={}; +this.killWordOnPaste=true; +this.makeLinkShowsTarget=true; +this.charSet=Xinha.is_gecko?document.characterSet:document.charset; +this.imgURL="images/"; +this.popupURL="popups/"; +this.htmlRemoveTags=null; +this.flowToolbars=true; +this.showLoading=false; +this.stripScripts=true; +this.convertUrlsToLinks=true; +this.colorPickerCellSize="6px"; +this.colorPickerGranularity=18; +this.colorPickerPosition="bottom,right"; +this.colorPickerWebSafe=false; +this.colorPickerSaveColors=20; +this.fullScreen=false; +this.fullScreenMargins=[0,0,0,0]; +this.toolbar=[["popupeditor"],["separator","formatblock","fontname","fontsize","bold","italic","underline","strikethrough"],["separator","forecolor","hilitecolor","textindicator"],["separator","subscript","superscript"],["linebreak","separator","justifyleft","justifycenter","justifyright","justifyfull"],["separator","insertorderedlist","insertunorderedlist","outdent","indent"],["separator","inserthorizontalrule","createlink","insertimage","inserttable"],["linebreak","separator","undo","redo","selectall","print"],(Xinha.is_gecko?[]:["cut","copy","paste","overwrite","saveas"]),["separator","killword","clearfonts","removeformat","toggleborders","splitblock","lefttoright","righttoleft"],["separator","htmlmode","showhelp","about"]]; +this.fontname={"— font —":"","Arial":"arial,helvetica,sans-serif","Courier New":"courier new,courier,monospace","Georgia":"georgia,times new roman,times,serif","Tahoma":"tahoma,arial,helvetica,sans-serif","Times New Roman":"times new roman,times,serif","Verdana":"verdana,arial,helvetica,sans-serif","impact":"impact","WingDings":"wingdings"}; +this.fontsize={"— size —":"","1 (8 pt)":"1","2 (10 pt)":"2","3 (12 pt)":"3","4 (14 pt)":"4","5 (18 pt)":"5","6 (24 pt)":"6","7 (36 pt)":"7"}; +this.formatblock={"— format —":"","Heading 1":"h1","Heading 2":"h2","Heading 3":"h3","Heading 4":"h4","Heading 5":"h5","Heading 6":"h6","Normal":"p","Address":"address","Formatted":"pre"}; +this.customSelects={}; +function cut_copy_paste(e,_e,_f){ +e.execCommand(_e); +} +this.debug=true; +this.URIs={"blank":"popups/blank.html","link":_editor_url+"modules/CreateLink/link.html","insert_image":_editor_url+"modules/InsertImage/insert_image.html","insert_table":_editor_url+"modules/InsertTable/insert_table.html","select_color":"select_color.html","about":"about.html","help":"editor_help.html"}; +this.btnList={bold:["Bold",Xinha._lc({key:"button_bold",string:["ed_buttons_main.gif",3,2]},"Xinha"),false,function(e){ +e.execCommand("bold"); +}],italic:["Italic",Xinha._lc({key:"button_italic",string:["ed_buttons_main.gif",2,2]},"Xinha"),false,function(e){ +e.execCommand("italic"); +}],underline:["Underline",Xinha._lc({key:"button_underline",string:["ed_buttons_main.gif",2,0]},"Xinha"),false,function(e){ +e.execCommand("underline"); +}],strikethrough:["Strikethrough",Xinha._lc({key:"button_strikethrough",string:["ed_buttons_main.gif",3,0]},"Xinha"),false,function(e){ +e.execCommand("strikethrough"); +}],subscript:["Subscript",Xinha._lc({key:"button_subscript",string:["ed_buttons_main.gif",3,1]},"Xinha"),false,function(e){ +e.execCommand("subscript"); +}],superscript:["Superscript",Xinha._lc({key:"button_superscript",string:["ed_buttons_main.gif",2,1]},"Xinha"),false,function(e){ +e.execCommand("superscript"); +}],justifyleft:["Justify Left",["ed_buttons_main.gif",0,0],false,function(e){ +e.execCommand("justifyleft"); +}],justifycenter:["Justify Center",["ed_buttons_main.gif",1,1],false,function(e){ +e.execCommand("justifycenter"); +}],justifyright:["Justify Right",["ed_buttons_main.gif",1,0],false,function(e){ +e.execCommand("justifyright"); +}],justifyfull:["Justify Full",["ed_buttons_main.gif",0,1],false,function(e){ +e.execCommand("justifyfull"); +}],orderedlist:["Ordered List",["ed_buttons_main.gif",0,3],false,function(e){ +e.execCommand("insertorderedlist"); +}],unorderedlist:["Bulleted List",["ed_buttons_main.gif",1,3],false,function(e){ +e.execCommand("insertunorderedlist"); +}],insertorderedlist:["Ordered List",["ed_buttons_main.gif",0,3],false,function(e){ +e.execCommand("insertorderedlist"); +}],insertunorderedlist:["Bulleted List",["ed_buttons_main.gif",1,3],false,function(e){ +e.execCommand("insertunorderedlist"); +}],outdent:["Decrease Indent",["ed_buttons_main.gif",1,2],false,function(e){ +e.execCommand("outdent"); +}],indent:["Increase Indent",["ed_buttons_main.gif",0,2],false,function(e){ +e.execCommand("indent"); +}],forecolor:["Font Color",["ed_buttons_main.gif",3,3],false,function(e){ +e.execCommand("forecolor"); +}],hilitecolor:["Background Color",["ed_buttons_main.gif",2,3],false,function(e){ +e.execCommand("hilitecolor"); +}],undo:["Undoes your last action",["ed_buttons_main.gif",4,2],false,function(e){ +e.execCommand("undo"); +}],redo:["Redoes your last action",["ed_buttons_main.gif",5,2],false,function(e){ +e.execCommand("redo"); +}],cut:["Cut selection",["ed_buttons_main.gif",5,0],false,cut_copy_paste],copy:["Copy selection",["ed_buttons_main.gif",4,0],false,cut_copy_paste],paste:["Paste from clipboard",["ed_buttons_main.gif",4,1],false,cut_copy_paste],selectall:["Select all","ed_selectall.gif",false,function(e){ +e.execCommand("selectall"); +}],inserthorizontalrule:["Horizontal Rule",["ed_buttons_main.gif",6,0],false,function(e){ +e.execCommand("inserthorizontalrule"); +}],createlink:["Insert Web Link",["ed_buttons_main.gif",6,1],false,function(e){ +e._createLink(); +}],insertimage:["Insert/Modify Image",["ed_buttons_main.gif",6,3],false,function(e){ +e.execCommand("insertimage"); +}],inserttable:["Insert Table",["ed_buttons_main.gif",6,2],false,function(e){ +e.execCommand("inserttable"); +}],htmlmode:["Toggle HTML Source",["ed_buttons_main.gif",7,0],true,function(e){ +e.execCommand("htmlmode"); +}],toggleborders:["Toggle Borders",["ed_buttons_main.gif",7,2],false,function(e){ +e._toggleBorders(); +}],print:["Print document",["ed_buttons_main.gif",8,1],false,function(e){ +if(Xinha.is_gecko){ +e._iframe.contentWindow.print(); +}else{ +e.focusEditor(); +print(); +} +}],saveas:["Save as","ed_saveas.gif",false,function(e){ +e.execCommand("saveas",false,"noname.htm"); +}],about:["About this editor",["ed_buttons_main.gif",8,2],true,function(e){ +e.execCommand("about"); +}],showhelp:["Help using editor",["ed_buttons_main.gif",9,2],true,function(e){ +e.execCommand("showhelp"); +}],splitblock:["Split Block","ed_splitblock.gif",false,function(e){ +e._splitBlock(); +}],lefttoright:["Direction left to right",["ed_buttons_main.gif",0,4],false,function(e){ +e.execCommand("lefttoright"); +}],righttoleft:["Direction right to left",["ed_buttons_main.gif",1,4],false,function(e){ +e.execCommand("righttoleft"); +}],overwrite:["Insert/Overwrite","ed_overwrite.gif",false,function(e){ +e.execCommand("overwrite"); +}],wordclean:["MS Word Cleaner",["ed_buttons_main.gif",5,3],false,function(e){ +e._wordClean(); +}],clearfonts:["Clear Inline Font Specifications",["ed_buttons_main.gif",5,4],true,function(e){ +e._clearFonts(); +}],removeformat:["Remove formatting",["ed_buttons_main.gif",4,4],false,function(e){ +e.execCommand("removeformat"); +}],killword:["Clear MSOffice tags",["ed_buttons_main.gif",4,3],false,function(e){ +e.execCommand("killword"); +}]}; +for(var i in this.btnList){ +var btn=this.btnList[i]; +if(typeof btn!="object"){ +continue; +} +if(typeof btn[1]!="string"){ +btn[1][0]=_editor_url+this.imgURL+btn[1][0]; +}else{ +btn[1]=_editor_url+this.imgURL+btn[1]; +} +btn[0]=Xinha._lc(btn[0]); +} +}; +Xinha.Config.prototype.registerButton=function(id,_3a,_3b,_3c,_3d,_3e){ +var _3f; +if(typeof id=="string"){ +_3f=id; +}else{ +if(typeof id=="object"){ +_3f=id.id; +}else{ +alert("ERROR [Xinha.Config::registerButton]:\ninvalid arguments"); +return false; +} +} +switch(typeof id){ +case "string": +this.btnList[id]=[_3a,_3b,_3c,_3d,_3e]; +break; +case "object": +this.btnList[id.id]=[id.tooltip,id.image,id.textMode,id.action,id.context]; +break; +} +}; +Xinha.prototype.registerPanel=function(_40,_41){ +if(!_40){ +_40="right"; +} +this.setLoadingMessage("Register panel "+_40); +var _42=this.addPanel(_40); +if(_41){ +_41.drawPanelIn(_42); +} +}; +Xinha.Config.prototype.registerDropdown=function(_43){ +this.customSelects[_43.id]=_43; +}; +Xinha.Config.prototype.hideSomeButtons=function(_44){ +var _45=this.toolbar; +for(var i=_45.length;--i>=0;){ +var _47=_45[i]; +for(var j=_47.length;--j>=0;){ +if(_44.indexOf(" "+_47[j]+" ")>=0){ +var len=1; +if(/separator|space/.test(_47[j+1])){ +len=2; +} +_47.splice(j,len); +} +} +} +}; +Xinha.Config.prototype.addToolbarElement=function(id,_4b,_4c){ +var _4d=this.toolbar; +var a,i,j,o,sid; +var _4f=false; +var _50=false; +var _51=0; +var _52=0; +var _53=0; +var _54=false; +var _55=false; +if((id&&typeof id=="object")&&(id.constructor==Array)){ +_4f=true; +} +if((_4b&&typeof _4b=="object")&&(_4b.constructor==Array)){ +_50=true; +_51=_4b.length; +} +if(_4f){ +for(i=0;i=0;){ +a.splice(j,0,id[i]); +} +}else{ +a[j]=id; +} +}else{ +if(_4c<0){ +j=j+_4c+1; +}else{ +if(_4c>0){ +j=j+_4c; +} +} +if(_4f){ +for(i=id.length;--i>=0;){ +a.splice(j,0,id[i]); +} +}else{ +a.splice(j,0,id); +} +} +}else{ +_4d[0].splice(0,0,"separator"); +if(_4f){ +for(i=id.length;--i>=0;){ +_4d[0].splice(0,0,id[i]); +} +}else{ +_4d[0].splice(0,0,id); +} +} +}; +Xinha.Config.prototype.removeToolbarElement=Xinha.Config.prototype.hideSomeButtons; +Xinha.replaceAll=function(_56){ +var tas=document.getElementsByTagName("textarea"); +for(var i=tas.length;i>0;(new Xinha(tas[--i],_56)).generate()){ +} +}; +Xinha.replace=function(id,_5a){ +var ta=Xinha.getElementById("textarea",id); +return ta?(new Xinha(ta,_5a)).generate():null; +}; +Xinha.prototype._createToolbar=function(){ +this.setLoadingMessage("Create Toolbar"); +var _5c=this; +var _5d=document.createElement("div"); +this._toolBar=this._toolbar=_5d; +_5d.className="toolbar"; +_5d.unselectable="1"; +Xinha.freeLater(this,"_toolBar"); +Xinha.freeLater(this,"_toolbar"); +var _5e=null; +var _5f={}; +this._toolbarObjects=_5f; +this._createToolbar1(_5c,_5d,_5f); +this._htmlArea.appendChild(_5d); +return _5d; +}; +Xinha.prototype._setConfig=function(_60){ +this.config=_60; +}; +Xinha.prototype._addToolbar=function(){ +this._createToolbar1(this,this._toolbar,this._toolbarObjects); +}; +Xinha._createToolbarBreakingElement=function(){ +var brk=document.createElement("div"); +brk.style.height="1px"; +brk.style.width="1px"; +brk.style.lineHeight="1px"; +brk.style.fontSize="1px"; +brk.style.clear="both"; +return brk; +}; +Xinha.prototype._createToolbar1=function(_62,_63,_64){ +var _65; +if(_62.config.flowToolbars){ +_63.appendChild(Xinha._createToolbarBreakingElement()); +} +function newLine(){ +if(typeof _65!="undefined"&&_65.childNodes.length===0){ +return; +} +var _66=document.createElement("table"); +_66.border="0px"; +_66.cellSpacing="0px"; +_66.cellPadding="0px"; +if(_62.config.flowToolbars){ +if(Xinha.is_ie){ +_66.style.styleFloat="left"; +}else{ +_66.style.cssFloat="left"; +} +} +_63.appendChild(_66); +var _67=document.createElement("tbody"); +_66.appendChild(_67); +_65=document.createElement("tr"); +_67.appendChild(_65); +_66.className="toolbarRow"; +} +newLine(); +function setButtonStatus(id,_69){ +var _6a=this[id]; +var el=this.element; +if(_6a!=_69){ +switch(id){ +case "enabled": +if(_69){ +Xinha._removeClass(el,"buttonDisabled"); +el.disabled=false; +}else{ +Xinha._addClass(el,"buttonDisabled"); +el.disabled=true; +} +break; +case "active": +if(_69){ +Xinha._addClass(el,"buttonPressed"); +}else{ +Xinha._removeClass(el,"buttonPressed"); +} +break; +} +this[id]=_69; +} +} +function createSelect(txt){ +var _6d=null; +var el=null; +var cmd=null; +var _70=_62.config.customSelects; +var _71=null; +var _72=""; +switch(txt){ +case "fontsize": +case "fontname": +case "formatblock": +_6d=_62.config[txt]; +cmd=txt; +break; +default: +cmd=txt; +var _73=_70[cmd]; +if(typeof _73!="undefined"){ +_6d=_73.options; +_71=_73.context; +if(typeof _73.tooltip!="undefined"){ +_72=_73.tooltip; +} +}else{ +alert("ERROR [createSelect]:\nCan't find the requested dropdown definition"); +} +break; +} +if(_6d){ +el=document.createElement("select"); +el.title=_72; +var obj={name:txt,element:el,enabled:true,text:false,cmd:cmd,state:setButtonStatus,context:_71}; +Xinha.freeLater(obj); +_64[txt]=obj; +for(var i in _6d){ +if(typeof (_6d[i])!="string"){ +continue; +} +var op=document.createElement("option"); +op.innerHTML=Xinha._lc(i); +op.value=_6d[i]; +el.appendChild(op); +} +Xinha._addEvent(el,"change",function(){ +_62._comboSelected(el,txt); +}); +} +return el; +} +function createButton(txt){ +var el,btn,obj=null; +switch(txt){ +case "separator": +if(_62.config.flowToolbars){ +newLine(); +} +el=document.createElement("div"); +el.className="separator"; +break; +case "space": +el=document.createElement("div"); +el.className="space"; +break; +case "linebreak": +newLine(); +return false; +case "textindicator": +el=document.createElement("div"); +el.appendChild(document.createTextNode("A")); +el.className="indicator"; +el.title=Xinha._lc("Current style"); +obj={name:txt,element:el,enabled:true,active:false,text:false,cmd:"textindicator",state:setButtonStatus}; +Xinha.freeLater(obj); +_64[txt]=obj; +break; +default: +btn=_62.config.btnList[txt]; +} +if(!el&&btn){ +el=document.createElement("a"); +el.style.display="block"; +el.href="javascript:void(0)"; +el.style.textDecoration="none"; +el.title=btn[0]; +el.className="button"; +el.style.direction="ltr"; +obj={name:txt,element:el,enabled:true,active:false,text:btn[2],cmd:btn[3],state:setButtonStatus,context:btn[4]||null}; +Xinha.freeLater(el); +Xinha.freeLater(obj); +_64[txt]=obj; +el.ondrag=function(){ +return false; +}; +Xinha._addEvent(el,"mouseout",function(ev){ +if(obj.enabled){ +Xinha._removeClass(el,"buttonActive"); +if(obj.active){ +Xinha._addClass(el,"buttonPressed"); +} +} +}); +Xinha._addEvent(el,"mousedown",function(ev){ +if(obj.enabled){ +Xinha._addClass(el,"buttonActive"); +Xinha._removeClass(el,"buttonPressed"); +Xinha._stopEvent(Xinha.is_ie?window.event:ev); +} +}); +Xinha._addEvent(el,"click",function(ev){ +if(obj.enabled){ +Xinha._removeClass(el,"buttonActive"); +if(Xinha.is_gecko){ +_62.activateEditor(); +} +obj.cmd(_62,obj.name,obj); +Xinha._stopEvent(Xinha.is_ie?window.event:ev); +} +}); +var _7c=Xinha.makeBtnImg(btn[1]); +var img=_7c.firstChild; +el.appendChild(_7c); +obj.imgel=img; +obj.swapImage=function(_7e){ +if(typeof _7e!="string"){ +img.src=_7e[0]; +img.style.position="relative"; +img.style.top=_7e[2]?("-"+(18*(_7e[2]+1))+"px"):"-18px"; +img.style.left=_7e[1]?("-"+(18*(_7e[1]+1))+"px"):"-18px"; +}else{ +obj.imgel.src=_7e; +img.style.top="0px"; +img.style.left="0px"; +} +}; +}else{ +if(!el){ +el=createSelect(txt); +} +} +return el; +} +var _7f=true; +for(var i=0;i] button to switch back to WYSIWYG."); +div.style.display="none"; +this._statusBarTextMode=div; +Xinha.freeLater(this,"_statusBarTextMode"); +this._statusBar.appendChild(div); +if(!this.config.statusBar){ +_8c.style.display="none"; +} +return _8c; +}; +Xinha.prototype.generate=function(){ +var i; +var _8f=this; +if(Xinha.is_ie){ +if(typeof InternetExplorer=="undefined"){ +Xinha.loadPlugin("InternetExplorer",function(){ +_8f.generate(); +},_editor_url+"modules/InternetExplorer/InternetExplorer.js"); +return false; +} +_8f._browserSpecificPlugin=_8f.registerPlugin("InternetExplorer"); +}else{ +if(typeof Gecko=="undefined"){ +Xinha.loadPlugin("Gecko",function(){ +_8f.generate(); +},_editor_url+"modules/Gecko/Gecko.js"); +return false; +} +_8f._browserSpecificPlugin=_8f.registerPlugin("Gecko"); +} +this.setLoadingMessage("Generate Xinha object"); +if(typeof Dialog=="undefined"){ +Xinha._loadback(_editor_url+"modules/Dialogs/dialog.js",this.generate,this); +return false; +} +if(typeof Xinha.Dialog=="undefined"){ +Xinha._loadback(_editor_url+"modules/Dialogs/inline-dialog.js",this.generate,this); +return false; +} +if(typeof FullScreen=="undefined"){ +Xinha.loadPlugin("FullScreen",function(){ +_8f.generate(); +},_editor_url+"modules/FullScreen/full-screen.js"); +return false; +} +var _90=_8f.config.toolbar; +for(i=_90.length;--i>=0;){ +for(var j=_90[i].length;--j>=0;){ +switch(_90[i][j]){ +case "popupeditor": +_8f.registerPlugin("FullScreen"); +break; +case "insertimage": +if(typeof InsertImage=="undefined"&&typeof Xinha.prototype._insertImage=="undefined"){ +Xinha.loadPlugin("InsertImage",function(){ +_8f.generate(); +},_editor_url+"modules/InsertImage/insert_image.js"); +return false; +}else{ +if(typeof InsertImage!="undefined"){ +_8f.registerPlugin("InsertImage"); +} +} +break; +case "createlink": +if(typeof CreateLink=="undefined"&&typeof Xinha.prototype._createLink=="undefined"&&typeof Linker=="undefined"){ +Xinha.loadPlugin("CreateLink",function(){ +_8f.generate(); +},_editor_url+"modules/CreateLink/link.js"); +return false; +}else{ +if(typeof CreateLink!="undefined"){ +_8f.registerPlugin("CreateLink"); +} +} +break; +case "inserttable": +if(typeof InsertTable=="undefined"&&typeof Xinha.prototype._insertTable=="undefined"){ +Xinha.loadPlugin("InsertTable",function(){ +_8f.generate(); +},_editor_url+"modules/InsertTable/insert_table.js"); +return false; +}else{ +if(typeof InsertTable!="undefined"){ +_8f.registerPlugin("InsertTable"); +} +} +break; +case "hilitecolor": +case "forecolor": +if(typeof ColorPicker=="undefined"){ +Xinha.loadPlugin("ColorPicker",function(){ +_8f.generate(); +},_editor_url+"modules/ColorPicker/ColorPicker.js"); +return false; +}else{ +if(typeof ColorPicker!="undefined"){ +_8f.registerPlugin("ColorPicker"); +} +} +break; +} +} +} +if(Xinha.is_gecko&&(_8f.config.mozParaHandler=="best"||_8f.config.mozParaHandler=="dirty")){ +switch(this.config.mozParaHandler){ +case "dirty": +var _92=_editor_url+"modules/Gecko/paraHandlerDirty.js"; +break; +default: +var _92=_editor_url+"modules/Gecko/paraHandlerBest.js"; +break; +} +if(typeof EnterParagraphs=="undefined"){ +Xinha.loadPlugin("EnterParagraphs",function(){ +_8f.generate(); +},_92); +return false; +} +_8f.registerPlugin("EnterParagraphs"); +} +switch(this.config.getHtmlMethod){ +case "TransformInnerHTML": +var _93=_editor_url+"modules/GetHtml/TransformInnerHTML.js"; +break; +default: +var _93=_editor_url+"modules/GetHtml/DOMwalk.js"; +break; +} +if(typeof GetHtmlImplementation=="undefined"){ +Xinha.loadPlugin("GetHtmlImplementation",function(){ +_8f.generate(); +},_93); +return false; +}else{ +_8f.registerPlugin("GetHtmlImplementation"); +} +if(_editor_skin!==""){ +var _94=false; +var _95=document.getElementsByTagName("head")[0]; +var _96=document.getElementsByTagName("link"); +for(i=0;i<_96.length;i++){ +if((_96[i].rel=="stylesheet")&&(_96[i].href==_editor_url+"skins/"+_editor_skin+"/skin.css")){ +_94=true; +} +} +if(!_94){ +var _97=document.createElement("link"); +_97.type="text/css"; +_97.href=_editor_url+"skins/"+_editor_skin+"/skin.css"; +_97.rel="stylesheet"; +_95.appendChild(_97); +} +} +this._framework={"table":document.createElement("table"),"tbody":document.createElement("tbody"),"tb_row":document.createElement("tr"),"tb_cell":document.createElement("td"),"tp_row":document.createElement("tr"),"tp_cell":this._panels.top.container,"ler_row":document.createElement("tr"),"lp_cell":this._panels.left.container,"ed_cell":document.createElement("td"),"rp_cell":this._panels.right.container,"bp_row":document.createElement("tr"),"bp_cell":this._panels.bottom.container,"sb_row":document.createElement("tr"),"sb_cell":document.createElement("td")}; +Xinha.freeLater(this._framework); +var fw=this._framework; +fw.table.border="0"; +fw.table.cellPadding="0"; +fw.table.cellSpacing="0"; +fw.tb_row.style.verticalAlign="top"; +fw.tp_row.style.verticalAlign="top"; +fw.ler_row.style.verticalAlign="top"; +fw.bp_row.style.verticalAlign="top"; +fw.sb_row.style.verticalAlign="top"; +fw.ed_cell.style.position="relative"; +fw.tb_row.appendChild(fw.tb_cell); +fw.tb_cell.colSpan=3; +fw.tp_row.appendChild(fw.tp_cell); +fw.tp_cell.colSpan=3; +fw.ler_row.appendChild(fw.lp_cell); +fw.ler_row.appendChild(fw.ed_cell); +fw.ler_row.appendChild(fw.rp_cell); +fw.bp_row.appendChild(fw.bp_cell); +fw.bp_cell.colSpan=3; +fw.sb_row.appendChild(fw.sb_cell); +fw.sb_cell.colSpan=3; +fw.tbody.appendChild(fw.tb_row); +fw.tbody.appendChild(fw.tp_row); +fw.tbody.appendChild(fw.ler_row); +fw.tbody.appendChild(fw.bp_row); +fw.tbody.appendChild(fw.sb_row); +fw.table.appendChild(fw.tbody); +var _99=this._framework.table; +this._htmlArea=_99; +Xinha.freeLater(this,"_htmlArea"); +_99.className="htmlarea"; +this._framework.tb_cell.appendChild(this._createToolbar()); +var _9a=document.createElement("iframe"); +_9a.src=_editor_url+_8f.config.URIs.blank; +this._framework.ed_cell.appendChild(_9a); +this._iframe=_9a; +this._iframe.className="xinha_iframe"; +Xinha.freeLater(this,"_iframe"); +var _9b=this._createStatusBar(); +this._framework.sb_cell.appendChild(_9b); +var _9c=this._textArea; +_9c.parentNode.insertBefore(_99,_9c); +_9c.className="xinha_textarea"; +Xinha.removeFromParent(_9c); +this._framework.ed_cell.appendChild(_9c); +if(_9c.form){ +Xinha.prependDom0Event(this._textArea.form,"submit",function(){ +_8f._textArea.value=_8f.outwardHtml(_8f.getHTML()); +return true; +}); +var _9d=_9c.value; +Xinha.prependDom0Event(this._textArea.form,"reset",function(){ +_8f.setHTML(_8f.inwardHtml(_9d)); +_8f.updateToolbar(); +return true; +}); +if(!_9c.form.xinha_submit){ +try{ +_9c.form.xinha_submit=_9c.form.submit; +_9c.form.submit=function(){ +this.onsubmit(); +this.xinha_submit(); +}; +} +catch(ex){ +} +} +} +Xinha.prependDom0Event(window,"unload",function(){ +_9c.value=_8f.outwardHtml(_8f.getHTML()); +return true; +}); +_9c.style.display="none"; +_8f.initSize(); +_8f._iframeLoadDone=false; +Xinha._addEvent(this._iframe,"load",function(e){ +if(!_8f._iframeLoadDone){ +_8f._iframeLoadDone=true; +_8f.initIframe(); +} +return true; +}); +}; +Xinha.prototype.initSize=function(){ +this.setLoadingMessage("Init editor size"); +var _9f=this; +var _a0=null; +var _a1=null; +switch(this.config.width){ +case "auto": +_a0=this._initial_ta_size.w; +break; +case "toolbar": +_a0=this._toolBar.offsetWidth+"px"; +break; +default: +_a0=/[^0-9]/.test(this.config.width)?this.config.width:this.config.width+"px"; +break; +} +switch(this.config.height){ +case "auto": +_a1=this._initial_ta_size.h; +break; +default: +_a1=/[^0-9]/.test(this.config.height)?this.config.height:this.config.height+"px"; +break; +} +this.sizeEditor(_a0,_a1,this.config.sizeIncludesBars,this.config.sizeIncludesPanels); +this.notifyOn("panel_change",function(){ +_9f.sizeEditor(); +}); +}; +Xinha.prototype.sizeEditor=function(_a2,_a3,_a4,_a5){ +this._iframe.style.height="100%"; +this._textArea.style.height="100%"; +this._iframe.style.width=""; +this._textArea.style.width=""; +if(_a4!==null){ +this._htmlArea.sizeIncludesToolbars=_a4; +} +if(_a5!==null){ +this._htmlArea.sizeIncludesPanels=_a5; +} +if(_a2){ +this._htmlArea.style.width=_a2; +if(!this._htmlArea.sizeIncludesPanels){ +var _a6=this._panels.right; +if(_a6.on&&_a6.panels.length&&Xinha.hasDisplayedChildren(_a6.div)){ +this._htmlArea.style.width=(this._htmlArea.offsetWidth+parseInt(this.config.panel_dimensions.right,10))+"px"; +} +var _a7=this._panels.left; +if(_a7.on&&_a7.panels.length&&Xinha.hasDisplayedChildren(_a7.div)){ +this._htmlArea.style.width=(this._htmlArea.offsetWidth+parseInt(this.config.panel_dimensions.left,10))+"px"; +} +} +} +if(_a3){ +this._htmlArea.style.height=_a3; +if(!this._htmlArea.sizeIncludesToolbars){ +this._htmlArea.style.height=(this._htmlArea.offsetHeight+this._toolbar.offsetHeight+this._statusBar.offsetHeight)+"px"; +} +if(!this._htmlArea.sizeIncludesPanels){ +var _a8=this._panels.top; +if(_a8.on&&_a8.panels.length&&Xinha.hasDisplayedChildren(_a8.div)){ +this._htmlArea.style.height=(this._htmlArea.offsetHeight+parseInt(this.config.panel_dimensions.top,10))+"px"; +} +var _a9=this._panels.bottom; +if(_a9.on&&_a9.panels.length&&Xinha.hasDisplayedChildren(_a9.div)){ +this._htmlArea.style.height=(this._htmlArea.offsetHeight+parseInt(this.config.panel_dimensions.bottom,10))+"px"; +} +} +} +_a2=this._htmlArea.offsetWidth; +_a3=this._htmlArea.offsetHeight; +var _aa=this._panels; +var _ab=this; +var _ac=1; +function panel_is_alive(pan){ +if(_aa[pan].on&&_aa[pan].panels.length&&Xinha.hasDisplayedChildren(_aa[pan].container)){ +_aa[pan].container.style.display=""; +return true; +}else{ +_aa[pan].container.style.display="none"; +return false; +} +} +if(panel_is_alive("left")){ +_ac+=1; +} +if(panel_is_alive("right")){ +_ac+=1; +} +this._framework.tb_cell.colSpan=_ac; +this._framework.tp_cell.colSpan=_ac; +this._framework.bp_cell.colSpan=_ac; +this._framework.sb_cell.colSpan=_ac; +if(!this._framework.tp_row.childNodes.length){ +Xinha.removeFromParent(this._framework.tp_row); +}else{ +if(!Xinha.hasParentNode(this._framework.tp_row)){ +this._framework.tbody.insertBefore(this._framework.tp_row,this._framework.ler_row); +} +} +if(!this._framework.bp_row.childNodes.length){ +Xinha.removeFromParent(this._framework.bp_row); +}else{ +if(!Xinha.hasParentNode(this._framework.bp_row)){ +this._framework.tbody.insertBefore(this._framework.bp_row,this._framework.ler_row.nextSibling); +} +} +if(!this.config.statusBar){ +Xinha.removeFromParent(this._framework.sb_row); +}else{ +if(!Xinha.hasParentNode(this._framework.sb_row)){ +this._framework.table.appendChild(this._framework.sb_row); +} +} +this._framework.lp_cell.style.width=this.config.panel_dimensions.left; +this._framework.rp_cell.style.width=this.config.panel_dimensions.right; +this._framework.tp_cell.style.height=this.config.panel_dimensions.top; +this._framework.bp_cell.style.height=this.config.panel_dimensions.bottom; +this._framework.tb_cell.style.height=this._toolBar.offsetHeight+"px"; +this._framework.sb_cell.style.height=this._statusBar.offsetHeight+"px"; +var _ae=_a3-this._toolBar.offsetHeight-this._statusBar.offsetHeight; +if(panel_is_alive("top")){ +_ae-=parseInt(this.config.panel_dimensions.top,10); +} +if(panel_is_alive("bottom")){ +_ae-=parseInt(this.config.panel_dimensions.bottom,10); +} +this._iframe.style.height=_ae+"px"; +var _af=_a2; +if(panel_is_alive("left")){ +_af-=parseInt(this.config.panel_dimensions.left,10); +} +if(panel_is_alive("right")){ +_af-=parseInt(this.config.panel_dimensions.right,10); +} +this._iframe.style.width=_af+"px"; +this._textArea.style.height=this._iframe.style.height; +this._textArea.style.width=this._iframe.style.width; +this.notifyOf("resize",{width:this._htmlArea.offsetWidth,height:this._htmlArea.offsetHeight}); +}; +Xinha.prototype.addPanel=function(_b0){ +var div=document.createElement("div"); +div.side=_b0; +if(_b0=="left"||_b0=="right"){ +div.style.width=this.config.panel_dimensions[_b0]; +if(this._iframe){ +div.style.height=this._iframe.style.height; +} +} +Xinha.addClasses(div,"panel"); +this._panels[_b0].panels.push(div); +this._panels[_b0].div.appendChild(div); +this.notifyOf("panel_change",{"action":"add","panel":div}); +return div; +}; +Xinha.prototype.removePanel=function(_b2){ +this._panels[_b2.side].div.removeChild(_b2); +var _b3=[]; +for(var i=0;i\n"; +if(typeof _c4.config.baseHref!="undefined"&&_c4.config.baseHref!==null){ +_c5+="\n"; +} +_c5+=Xinha.addCoreCSS(); +if(_c4.config.pageStyle){ +_c5+=""; +} +if(typeof _c4.config.pageStyleSheets!=="undefined"){ +for(var i=0;i<_c4.config.pageStyleSheets.length;i++){ +if(_c4.config.pageStyleSheets[i].length>0){ +_c5+=""; +} +} +} +_c5+="\n"; +_c5+="\n"; +_c5+=_c4.inwardHtml(_c4._textArea.value); +_c5+="\n"; +_c5+=""; +}else{ +_c5=_c4.inwardHtml(_c4._textArea.value); +if(_c5.match(Xinha.RE_doctype)){ +_c4.setDoctype(RegExp.$1); +_c5=_c5.replace(Xinha.RE_doctype,""); +} +var _c7=_c5.match(//gi); +_c5=_c5.replace(/\s*/gi,""); +_c7?_c5=_c5.replace(/<\/head>/i,_c7.join("\n")+"\n"):null; +} +doc.write(_c5); +doc.close(); +if(this.config.fullScreen){ +this._fullScreen(); +} +this.setEditorEvents(); +}; +Xinha.prototype.whenDocReady=function(F){ +var E=this; +if(this._doc&&this._doc.body){ +F(); +}else{ +setTimeout(function(){ +E.whenDocReady(F); +},50); +} +}; +Xinha.prototype.setMode=function(_ca){ +var _cb; +if(typeof _ca=="undefined"){ +_ca=this._editMode=="textmode"?"wysiwyg":"textmode"; +} +switch(_ca){ +case "textmode": +this.setCC("iframe"); +_cb=this.outwardHtml(this.getHTML()); +this.setHTML(_cb); +this.deactivateEditor(); +this._iframe.style.display="none"; +this._textArea.style.display=""; +if(this.config.statusBar){ +this._statusBarTree.style.display="none"; +this._statusBarTextMode.style.display=""; +} +this.notifyOf("modechange",{"mode":"text"}); +this.findCC("textarea"); +break; +case "wysiwyg": +this.setCC("textarea"); +_cb=this.inwardHtml(this.getHTML()); +this.deactivateEditor(); +this.setHTML(_cb); +this._iframe.style.display=""; +this._textArea.style.display="none"; +this.activateEditor(); +if(this.config.statusBar){ +this._statusBarTree.style.display=""; +this._statusBarTextMode.style.display="none"; +} +this.notifyOf("modechange",{"mode":"wysiwyg"}); +this.findCC("iframe"); +break; +default: +alert("Mode <"+_ca+"> not defined!"); +return false; +} +this._editMode=_ca; +for(var i in this.plugins){ +var _cd=this.plugins[i].instance; +if(_cd&&typeof _cd.onMode=="function"){ +_cd.onMode(_ca); +} +} +}; +Xinha.prototype.setFullHTML=function(_ce){ +var _cf=RegExp.multiline; +RegExp.multiline=true; +if(_ce.match(Xinha.RE_doctype)){ +this.setDoctype(RegExp.$1); +_ce=_ce.replace(Xinha.RE_doctype,""); +} +RegExp.multiline=_cf; +if(0){ +if(_ce.match(Xinha.RE_head)){ +this._doc.getElementsByTagName("head")[0].innerHTML=RegExp.$1; +} +if(_ce.match(Xinha.RE_body)){ +this._doc.getElementsByTagName("body")[0].innerHTML=RegExp.$1; +} +}else{ +var _d0=this.editorIsActivated(); +if(_d0){ +this.deactivateEditor(); +} +var _d1=/((.|\n)*?)<\/html>/i; +_ce=_ce.replace(_d1,"$1"); +this._doc.open("text/html","replace"); +this._doc.write(_ce); +this._doc.close(); +if(_d0){ +this.activateEditor(); +} +this.setEditorEvents(); +return true; +} +}; +Xinha.prototype.setEditorEvents=function(){ +var _d2=this; +var doc=this._doc; +_d2.whenDocReady(function(){ +Xinha._addEvents(doc,["mousedown"],function(){ +_d2.activateEditor(); +return true; +}); +Xinha._addEvents(doc,["keydown","keypress","mousedown","mouseup","drag"],function(_d4){ +return _d2._editorEvent(Xinha.is_ie?_d2._iframe.contentWindow.event:_d4); +}); +for(var i in _d2.plugins){ +var _d6=_d2.plugins[i].instance; +Xinha.refreshPlugin(_d6); +} +if(typeof _d2._onGenerate=="function"){ +_d2._onGenerate(); +} +Xinha.addDom0Event(window,"resize",function(e){ +_d2.sizeEditor(); +}); +_d2.removeLoadingMessage(); +}); +}; +Xinha.prototype.registerPlugin=function(){ +var _d8=arguments[0]; +if(_d8===null||typeof _d8=="undefined"||(typeof _d8=="string"&&eval("typeof "+_d8)=="undefined")){ +return false; +} +var _d9=[]; +for(var i=1;i=0;){ +ta.value+=" "; +} +ta.value+=str+"\n"; +} +function _dt(_fe,_ff){ +var tag=_fe.tagName.toLowerCase(),i; +var ns=Xinha.is_ie?_fe.scopeName:_fe.prefix; +debug(_ff,"- "+tag+" ["+ns+"]"); +for(i=_fe.firstChild;i;i=i.nextSibling){ +if(i.nodeType==1){ +_dt(i,_ff+2); +} +} +} +_dt(this._doc.body,0); +document.body.appendChild(ta); +}; +Xinha.getInnerText=function(el){ +var txt="",i; +for(i=el.firstChild;i;i=i.nextSibling){ +if(i.nodeType==3){ +txt+=i.data; +}else{ +if(i.nodeType==1){ +txt+=Xinha.getInnerText(i); +} +} +} +return txt; +}; +Xinha.prototype._wordClean=function(){ +var _104=this; +var _105={empty_tags:0,mso_class:0,mso_style:0,mso_xmlel:0,orig_len:this._doc.body.innerHTML.length,T:(new Date()).getTime()}; +var _106={empty_tags:"Empty tags removed: ",mso_class:"MSO class names removed: ",mso_style:"MSO inline style removed: ",mso_xmlel:"MSO XML elements stripped: "}; +function showStats(){ +var txt="Xinha word cleaner stats: \n\n"; +for(var i in _105){ +if(_106[i]){ +txt+=_106[i]+_105[i]+"\n"; +} +} +txt+="\nInitial document length: "+_105.orig_len+"\n"; +txt+="Final document length: "+_104._doc.body.innerHTML.length+"\n"; +txt+="Clean-up took "+(((new Date()).getTime()-_105.T)/1000)+" seconds"; +alert(txt); +} +function clearClass(node){ +var newc=node.className.replace(/(^|\s)mso.*?(\s|$)/ig," "); +if(newc!=node.className){ +node.className=newc; +if(!(/\S/.test(node.className))){ +node.removeAttribute("className"); +++_105.mso_class; +} +} +} +function clearStyle(node){ +var _10c=node.style.cssText.split(/\s*;\s*/); +for(var i=_10c.length;--i>=0;){ +if((/^mso|^tab-stops/i.test(_10c[i]))||(/^margin\s*:\s*0..\s+0..\s+0../i.test(_10c[i]))){ +++_105.mso_style; +_10c.splice(i,1); +} +} +node.style.cssText=_10c.join("; "); +} +var _10e=null; +if(Xinha.is_ie){ +_10e=function(el){ +el.outerHTML=Xinha.htmlEncode(el.innerText); +++_105.mso_xmlel; +}; +}else{ +_10e=function(el){ +var txt=document.createTextNode(Xinha.getInnerText(el)); +el.parentNode.insertBefore(txt,el); +Xinha.removeFromParent(el); +++_105.mso_xmlel; +}; +} +function checkEmpty(el){ +if(/^(span|b|strong|i|em|font|div|p)$/i.test(el.tagName)&&!el.firstChild){ +Xinha.removeFromParent(el); +++_105.empty_tags; +} +} +function parseTree(root){ +var tag=root.tagName.toLowerCase(),i,next; +if((Xinha.is_ie&&root.scopeName!="HTML")||(!Xinha.is_ie&&(/:/.test(tag)))){ +_10e(root); +return false; +}else{ +clearClass(root); +clearStyle(root); +for(i=root.firstChild;i;i=next){ +next=i.nextSibling; +if(i.nodeType==1&&parseTree(i)){ +checkEmpty(i); +} +} +} +return true; +} +parseTree(this._doc.body); +this.updateToolbar(); +}; +Xinha.prototype._clearFonts=function(){ +var D=this.getInnerHTML(); +if(confirm(Xinha._lc("Would you like to clear font typefaces?"))){ +D=D.replace(/face="[^"]*"/gi,""); +D=D.replace(/font-family:[^;}"']+;?/gi,""); +} +if(confirm(Xinha._lc("Would you like to clear font sizes?"))){ +D=D.replace(/size="[^"]*"/gi,""); +D=D.replace(/font-size:[^;}"']+;?/gi,""); +} +if(confirm(Xinha._lc("Would you like to clear font colours?"))){ +D=D.replace(/color="[^"]*"/gi,""); +D=D.replace(/([^-])color:[^;}"']+;?/gi,"$1"); +} +D=D.replace(/(style|class)="\s*"/gi,""); +D=D.replace(/<(font|span)\s*>/gi,""); +this.setHTML(D); +this.updateToolbar(); +}; +Xinha.prototype._splitBlock=function(){ +this._doc.execCommand("formatblock",false,"div"); +}; +Xinha.prototype.forceRedraw=function(){ +this._doc.body.style.visibility="hidden"; +this._doc.body.style.visibility=""; +}; +Xinha.prototype.focusEditor=function(){ +switch(this._editMode){ +case "wysiwyg": +try{ +if(Xinha._someEditorHasBeenActivated){ +this.activateEditor(); +this._iframe.contentWindow.focus(); +} +} +catch(ex){ +} +break; +case "textmode": +try{ +this._textArea.focus(); +} +catch(e){ +} +break; +default: +alert("ERROR: mode "+this._editMode+" is not defined"); +} +return this._doc; +}; +Xinha.prototype._undoTakeSnapshot=function(){ +++this._undoPos; +if(this._undoPos>=this.config.undoSteps){ +this._undoQueue.shift(); +--this._undoPos; +} +var take=true; +var txt=this.getInnerHTML(); +if(this._undoPos>0){ +take=(this._undoQueue[this._undoPos-1]!=txt); +} +if(take){ +this._undoQueue[this._undoPos]=txt; +}else{ +this._undoPos--; +} +}; +Xinha.prototype.undo=function(){ +if(this._undoPos>0){ +var txt=this._undoQueue[--this._undoPos]; +if(txt){ +this.setHTML(txt); +}else{ +++this._undoPos; +} +} +}; +Xinha.prototype.redo=function(){ +if(this._undoPos=0;){ +var el=_126[i]; +if(!el){ +continue; +} +var a=document.createElement("a"); +a.href="javascript:void(0)"; +a.el=el; +a.editor=this; +Xinha.addDom0Event(a,"click",function(){ +this.blur(); +this.editor.selectNodeContents(this.el); +this.editor.updateToolbar(true); +return false; +}); +Xinha.addDom0Event(a,"contextmenu",function(){ +this.blur(); +var info="Inline style:\n\n"; +info+=this.el.style.cssText.split(/;\s*/).join(";\n"); +alert(info); +return false; +}); +var txt=el.tagName.toLowerCase(); +if(typeof el.style!="undefined"){ +a.title=el.style.cssText; +} +if(el.id){ +txt+="#"+el.id; +} +if(el.className){ +txt+="."+el.className; +} +a.appendChild(document.createTextNode(txt)); +this._statusBarTree.appendChild(a); +if(i!==0){ +this._statusBarTree.appendChild(document.createTextNode(String.fromCharCode(187))); +} +} +} +} +for(var cmd in this._toolbarObjects){ +var btn=this._toolbarObjects[cmd]; +var _12e=true; +if(typeof (btn.state)!="function"){ +continue; +} +if(btn.context&&!text){ +_12e=false; +var _12f=btn.context; +var _130=[]; +if(/(.*)\[(.*?)\]/.test(_12f)){ +_12f=RegExp.$1; +_130=RegExp.$2.split(","); +} +_12f=_12f.toLowerCase(); +var _131=(_12f=="*"); +for(var k=0;k<_126.length;++k){ +if(!_126[k]){ +continue; +} +if(_131||(_126[k].tagName.toLowerCase()==_12f)){ +_12e=true; +var _133=null; +var att=null; +var comp=null; +var _136=null; +for(var ka=0;ka<_130.length;++ka){ +_133=_130[ka].match(/(.*)(==|!=|===|!==|>|>=|<|<=)(.*)/); +att=_133[1]; +comp=_133[2]; +_136=_133[3]; +if(!eval(_126[k][att]+comp+_136)){ +_12e=false; +break; +} +} +if(_12e){ +break; +} +} +} +} +btn.state("enabled",(!text||btn.text)&&_12e); +if(typeof cmd=="function"){ +continue; +} +var _138=this.config.customSelects[cmd]; +if((!text||btn.text)&&(typeof _138!="undefined")){ +_138.refresh(this); +continue; +} +switch(cmd){ +case "fontname": +case "fontsize": +if(!text){ +try{ +var _139=(""+doc.queryCommandValue(cmd)).toLowerCase(); +if(!_139){ +btn.element.selectedIndex=0; +break; +} +var _13a=this.config[cmd]; +var _13b=0; +for(var j in _13a){ +if((j.toLowerCase()==_139)||(_13a[j].substr(0,_139.length).toLowerCase()==_139)){ +btn.element.selectedIndex=_13b; +throw "ok"; +} +++_13b; +} +btn.element.selectedIndex=0; +} +catch(ex){ +} +} +break; +case "formatblock": +var _13d=[]; +for(var _13e in this.config.formatblock){ +if(typeof this.config.formatblock[_13e]=="string"){ +_13d[_13d.length]=this.config.formatblock[_13e]; +} +} +var _13f=this._getFirstAncestor(this.getSelection(),_13d); +if(_13f){ +for(var x=0;x<_13d.length;x++){ +if(_13d[x].toLowerCase()==_13f.tagName.toLowerCase()){ +btn.element.selectedIndex=x; +} +} +}else{ +btn.element.selectedIndex=0; +} +break; +case "textindicator": +if(!text){ +try{ +var _141=btn.element.style; +_141.backgroundColor=Xinha._makeColor(doc.queryCommandValue(Xinha.is_ie?"backcolor":"hilitecolor")); +if(/transparent/i.test(_141.backgroundColor)){ +_141.backgroundColor=Xinha._makeColor(doc.queryCommandValue("backcolor")); +} +_141.color=Xinha._makeColor(doc.queryCommandValue("forecolor")); +_141.fontFamily=doc.queryCommandValue("fontname"); +_141.fontWeight=doc.queryCommandState("bold")?"bold":"normal"; +_141.fontStyle=doc.queryCommandState("italic")?"italic":"normal"; +} +catch(ex){ +} +} +break; +case "htmlmode": +btn.state("active",text); +break; +case "lefttoright": +case "righttoleft": +var _142=this.getParentElement(); +while(_142&&!Xinha.isBlockElement(_142)){ +_142=_142.parentNode; +} +if(_142){ +btn.state("active",(_142.style.direction==((cmd=="righttoleft")?"rtl":"ltr"))); +} +break; +default: +cmd=cmd.replace(/(un)?orderedlist/i,"insert$1orderedlist"); +try{ +btn.state("active",(!text&&doc.queryCommandState(cmd))); +} +catch(ex){ +} +break; +} +} +if(this._customUndo&&!this._timerUndo){ +this._undoTakeSnapshot(); +var _143=this; +this._timerUndo=setTimeout(function(){ +_143._timerUndo=null; +},this.config.undoTimeout); +} +if(0&&Xinha.is_gecko){ +var s=this.getSelection(); +if(s&&s.isCollapsed&&s.anchorNode&&s.anchorNode.parentNode.tagName.toLowerCase()!="body"&&s.anchorNode.nodeType==3&&s.anchorOffset==s.anchorNode.length&&!(s.anchorNode.parentNode.nextSibling&&s.anchorNode.parentNode.nextSibling.nodeType==3)&&!Xinha.isBlockElement(s.anchorNode.parentNode)){ +try{ +s.anchorNode.parentNode.parentNode.insertBefore(this._doc.createTextNode("\t"),s.anchorNode.parentNode.nextSibling); +} +catch(ex){ +} +} +} +for(var _145 in this.plugins){ +var _146=this.plugins[_145].instance; +if(_146&&typeof _146.onUpdateToolbar=="function"){ +_146.onUpdateToolbar(); +} +} +}; +Xinha.prototype.getAllAncestors=function(){ +var p=this.getParentElement(); +var a=[]; +while(p&&(p.nodeType==1)&&(p.tagName.toLowerCase()!="body")){ +a.push(p); +p=p.parentNode; +} +a.push(this._doc.body); +return a; +}; +Xinha.prototype._getFirstAncestor=function(sel,_14a){ +var prnt=this.activeElement(sel); +if(prnt===null){ +try{ +prnt=(Xinha.is_ie?this.createRange(sel).parentElement():this.createRange(sel).commonAncestorContainer); +} +catch(ex){ +return null; +} +} +if(typeof _14a=="string"){ +_14a=[_14a]; +} +while(prnt){ +if(prnt.nodeType==1){ +if(_14a===null){ +return prnt; +} +if(_14a.contains(prnt.tagName.toLowerCase())){ +return prnt; +} +if(prnt.tagName.toLowerCase()=="body"){ +break; +} +if(prnt.tagName.toLowerCase()=="table"){ +break; +} +} +prnt=prnt.parentNode; +} +return null; +}; +Xinha.prototype._getAncestorBlock=function(sel){ +var prnt=(Xinha.is_ie?this.createRange(sel).parentElement:this.createRange(sel).commonAncestorContainer); +while(prnt&&(prnt.nodeType==1)){ +switch(prnt.tagName.toLowerCase()){ +case "div": +case "p": +case "address": +case "blockquote": +case "center": +case "del": +case "ins": +case "pre": +case "h1": +case "h2": +case "h3": +case "h4": +case "h5": +case "h6": +case "h7": +return prnt; +case "body": +case "noframes": +case "dd": +case "li": +case "th": +case "td": +case "noscript": +return null; +default: +break; +} +} +return null; +}; +Xinha.prototype._createImplicitBlock=function(type){ +var sel=this.getSelection(); +if(Xinha.is_ie){ +sel.empty(); +}else{ +sel.collapseToStart(); +} +var rng=this.createRange(sel); +}; +Xinha.prototype.surroundHTML=function(_151,_152){ +var html=this.getSelectedHTML(); +this.insertHTML(_151+html+_152); +}; +Xinha.prototype.hasSelectedText=function(){ +return this.getSelectedHTML()!==""; +}; +Xinha.prototype._comboSelected=function(el,txt){ +this.focusEditor(); +var _156=el.options[el.selectedIndex].value; +switch(txt){ +case "fontname": +case "fontsize": +this.execCommand(txt,false,_156); +break; +case "formatblock": +if(!_156){ +this.updateToolbar(); +break; +} +if(!Xinha.is_gecko||_156!=="blockquote"){ +_156="<"+_156+">"; +} +this.execCommand(txt,false,_156); +break; +default: +var _157=this.config.customSelects[txt]; +if(typeof _157!="undefined"){ +_157.action(this); +}else{ +alert("FIXME: combo box "+txt+" not implemented"); +} +break; +} +}; +Xinha.prototype._colorSelector=function(_158){ +var _159=this; +if(Xinha.is_gecko){ +try{ +_159._doc.execCommand("useCSS",false,false); +_159._doc.execCommand("styleWithCSS",false,true); +} +catch(ex){ +} +} +var btn=_159._toolbarObjects[_158].element; +var _15b; +if(_158=="hilitecolor"){ +if(Xinha.is_ie){ +_158="backcolor"; +_15b=Xinha._colorToRgb(_159._doc.queryCommandValue("backcolor")); +}else{ +_15b=Xinha._colorToRgb(_159._doc.queryCommandValue("hilitecolor")); +} +}else{ +_15b=Xinha._colorToRgb(_159._doc.queryCommandValue("forecolor")); +} +var _15c=function(_15d){ +_159._doc.execCommand(_158,false,_15d); +}; +if(Xinha.is_ie){ +var _15e=_159.createRange(_159.getSelection()); +_15c=function(_15f){ +_15e.select(); +_159._doc.execCommand(_158,false,_15f); +}; +} +var _160=new Xinha.colorPicker({cellsize:_159.config.colorPickerCellSize,callback:_15c,granularity:_159.config.colorPickerGranularity,websafe:_159.config.colorPickerWebSafe,savecolors:_159.config.colorPickerSaveColors}); +_160.open(_159.config.colorPickerPosition,btn,_15b); +}; +Xinha.prototype.execCommand=function(_161,UI,_163){ +var _164=this; +this.focusEditor(); +_161=_161.toLowerCase(); +if(this.firePluginEvent("onExecCommand",_161,UI,_163)){ +this.updateToolbar(); +return false; +} +switch(_161){ +case "htmlmode": +this.setMode(); +break; +case "hilitecolor": +case "forecolor": +this._colorSelector(_161); +break; +case "createlink": +this._createLink(); +break; +case "undo": +case "redo": +if(this._customUndo){ +this[_161](); +}else{ +this._doc.execCommand(_161,UI,_163); +} +break; +case "inserttable": +this._insertTable(); +break; +case "insertimage": +this._insertImage(); +break; +case "about": +this._popupDialog(_164.config.URIs.about,null,this); +break; +case "showhelp": +this._popupDialog(_164.config.URIs.help,null,this); +break; +case "killword": +this._wordClean(); +break; +case "cut": +case "copy": +case "paste": +this._doc.execCommand(_161,UI,_163); +if(this.config.killWordOnPaste){ +this._wordClean(); +} +break; +case "lefttoright": +case "righttoleft": +if(this.config.changeJustifyWithDirection){ +this._doc.execCommand((_161=="righttoleft")?"justifyright":"justifyleft",UI,_163); +} +var dir=(_161=="righttoleft")?"rtl":"ltr"; +var el=this.getParentElement(); +while(el&&!Xinha.isBlockElement(el)){ +el=el.parentNode; +} +if(el){ +if(el.style.direction==dir){ +el.style.direction=""; +}else{ +el.style.direction=dir; +} +} +break; +case "justifyleft": +case "justifyright": +_161.match(/^justify(.*)$/); +var ae=this.activeElement(this.getSelection()); +if(ae&&ae.tagName.toLowerCase()=="img"){ +ae.align=ae.align==RegExp.$1?"":RegExp.$1; +}else{ +this._doc.execCommand(_161,UI,_163); +} +break; +default: +try{ +this._doc.execCommand(_161,UI,_163); +} +catch(ex){ +if(this.config.debug){ +alert(ex+"\n\nby execCommand("+_161+");"); +} +} +break; +} +this.updateToolbar(); +return false; +}; +Xinha.prototype._editorEvent=function(ev){ +var _169=this; +if(typeof _169._textArea["on"+ev.type]=="function"){ +_169._textArea["on"+ev.type](); +} +if(this.isKeyEvent(ev)){ +if(_169.firePluginEvent("onKeyPress",ev)){ +return false; +} +if(this.isShortCut(ev)){ +this._shortCuts(ev); +} +} +if(ev.type=="mousedown"){ +if(_169.firePluginEvent("onMouseDown",ev)){ +return false; +} +} +if(_169._timerToolbar){ +clearTimeout(_169._timerToolbar); +} +_169._timerToolbar=setTimeout(function(){ +_169.updateToolbar(); +_169._timerToolbar=null; +},250); +}; +Xinha.prototype._shortCuts=function(ev){ +var key=this.getKey(ev).toLowerCase(); +var cmd=null; +var _16d=null; +switch(key){ +case "b": +cmd="bold"; +break; +case "i": +cmd="italic"; +break; +case "u": +cmd="underline"; +break; +case "s": +cmd="strikethrough"; +break; +case "l": +cmd="justifyleft"; +break; +case "e": +cmd="justifycenter"; +break; +case "r": +cmd="justifyright"; +break; +case "j": +cmd="justifyfull"; +break; +case "z": +cmd="undo"; +break; +case "y": +cmd="redo"; +break; +case "v": +cmd="paste"; +break; +case "n": +cmd="formatblock"; +_16d="p"; +break; +case "0": +cmd="killword"; +break; +case "1": +case "2": +case "3": +case "4": +case "5": +case "6": +cmd="formatblock"; +_16d="h"+key; +break; +} +if(cmd){ +this.execCommand(cmd,false,_16d); +Xinha._stopEvent(ev); +} +}; +Xinha.prototype.convertNode=function(el,_16f){ +var _170=this._doc.createElement(_16f); +while(el.firstChild){ +_170.appendChild(el.firstChild); +} +return _170; +}; +Xinha.prototype.scrollToElement=function(e){ +if(!e){ +e=this.getParentElement(); +if(!e){ +return; +} +} +var _172=Xinha.getElementTopLeft(e); +this._iframe.contentWindow.scrollTo(_172.left,_172.top); +}; +Xinha.prototype.getHTML=function(){ +var html=""; +switch(this._editMode){ +case "wysiwyg": +if(!this.config.fullPage){ +html=Xinha.getHTML(this._doc.body,false,this); +}else{ +html=this.doctype+"\n"+Xinha.getHTML(this._doc.documentElement,true,this); +} +break; +case "textmode": +html=this._textArea.value; +break; +default: +alert("Mode <"+this._editMode+"> not defined!"); +return false; +} +return html; +}; +Xinha.prototype.outwardHtml=function(html){ +for(var i in this.plugins){ +var _176=this.plugins[i].instance; +if(_176&&typeof _176.outwardHtml=="function"){ +html=_176.outwardHtml(html); +} +} +html=html.replace(/<(\/?)b(\s|>|\/)/ig,"<$1strong$2"); +html=html.replace(/<(\/?)i(\s|>|\/)/ig,"<$1em$2"); +html=html.replace(/<(\/?)strike(\s|>|\/)/ig,"<$1del$2"); +html=html.replace("onclick=\"try{if(document.designMode && document.designMode == 'on') return false;}catch(e){} window.open(","onclick=\"window.open("); +var _177=location.href.replace(/(https?:\/\/[^\/]*)\/.*/,"$1")+"/"; +html=html.replace(/https?:\/\/null\//g,_177); +html=html.replace(/((href|src|background)=[\'\"])\/+/ig,"$1"+_177); +html=this.outwardSpecialReplacements(html); +html=this.fixRelativeLinks(html); +if(this.config.sevenBitClean){ +html=html.replace(/[^ -~\r\n\t]/g,function(c){ +return "&#"+c.charCodeAt(0)+";"; +}); +} +html=html.replace(/(]*)(freezescript)/gi,"$1javascript"); +if(this.config.fullPage){ +html=Xinha.stripCoreCSS(html); +} +return html; +}; +Xinha.prototype.inwardHtml=function(html){ +for(var i in this.plugins){ +var _17b=this.plugins[i].instance; +if(_17b&&typeof _17b.inwardHtml=="function"){ +html=_17b.inwardHtml(html); +} +} +html=html.replace(/<(\/?)del(\s|>|\/)/ig,"<$1strike$2"); +html=html.replace("onclick=\"window.open(","onclick=\"try{if(document.designMode && document.designMode == 'on') return false;}catch(e){} window.open("); +html=this.inwardSpecialReplacements(html); +html=html.replace(/(]*)(javascript)/gi,"$1freezescript"); +var _17c=new RegExp("((href|src|background)=['\"])/+","gi"); +html=html.replace(_17c,"$1"+location.href.replace(/(https?:\/\/[^\/]*)\/.*/,"$1")+"/"); +html=this.fixRelativeLinks(html); +if(this.config.fullPage){ +html=Xinha.addCoreCSS(html); +} +return html; +}; +Xinha.prototype.outwardSpecialReplacements=function(html){ +for(var i in this.config.specialReplacements){ +var from=this.config.specialReplacements[i]; +var to=i; +if(typeof from.replace!="function"||typeof to.replace!="function"){ +continue; +} +var reg=new RegExp(from.replace(Xinha.RE_Specials,"\\$1"),"g"); +html=html.replace(reg,to.replace(/\$/g,"$$$$")); +} +return html; +}; +Xinha.prototype.inwardSpecialReplacements=function(html){ +for(var i in this.config.specialReplacements){ +var from=i; +var to=this.config.specialReplacements[i]; +if(typeof from.replace!="function"||typeof to.replace!="function"){ +continue; +} +var reg=new RegExp(from.replace(Xinha.RE_Specials,"\\$1"),"g"); +html=html.replace(reg,to.replace(/\$/g,"$$$$")); +} +return html; +}; +Xinha.prototype.fixRelativeLinks=function(html){ +if(typeof this.config.expandRelativeUrl!="undefined"&&this.config.expandRelativeUrl){ +var src=html.match(/(src|href)="([^"]*)"/gi); +} +var b=document.location.href; +if(src){ +var url,url_m,relPath,base_m,absPath; +for(var i=0;i not defined!"); +return false; +} +return html; +}; +Xinha.prototype.setHTML=function(html){ +if(!this.config.fullPage){ +this._doc.body.innerHTML=html; +}else{ +this.setFullHTML(html); +} +this._textArea.value=html; +}; +Xinha.prototype.setDoctype=function(_190){ +this.doctype=_190; +}; +Xinha._object=null; +Xinha.cloneObject=function(obj){ +if(!obj){ +return null; +} +var _192={}; +if(obj.constructor.toString().match(/\s*function Array\(/)){ +_192=obj.constructor(); +} +if(obj.constructor.toString().match(/\s*function Function\(/)){ +_192=obj; +}else{ +for(var n in obj){ +var node=obj[n]; +if(typeof node=="object"){ +_192[n]=Xinha.cloneObject(node); +}else{ +_192[n]=node; +} +} +} +return _192; +}; +Xinha.checkSupportedBrowser=function(){ +if(Xinha.is_gecko){ +if(navigator.productSub<20021201){ +alert("You need at least Mozilla-1.3 Alpha.\nSorry, your Gecko is not supported."); +return false; +} +if(navigator.productSub<20030210){ +alert("Mozilla < 1.3 Beta is not supported!\nI'll try, though, but it might not work."); +} +} +return Xinha.is_gecko||Xinha.ie_version>=5.5; +}; +Xinha._eventFlushers=[]; +Xinha.flushEvents=function(){ +var x=0; +var e=Xinha._eventFlushers.pop(); +while(e){ +try{ +if(e.length==3){ +Xinha._removeEvent(e[0],e[1],e[2]); +x++; +}else{ +if(e.length==2){ +e[0]["on"+e[1]]=null; +e[0]._xinha_dom0Events[e[1]]=null; +x++; +} +} +} +catch(ex){ +} +e=Xinha._eventFlushers.pop(); +} +}; +if(document.addEventListener){ +Xinha._addEvent=function(el,_198,func){ +el.addEventListener(_198,func,true); +Xinha._eventFlushers.push([el,_198,func]); +}; +Xinha._removeEvent=function(el,_19b,func){ +el.removeEventListener(_19b,func,true); +}; +Xinha._stopEvent=function(ev){ +ev.preventDefault(); +ev.stopPropagation(); +}; +}else{ +if(document.attachEvent){ +Xinha._addEvent=function(el,_19f,func){ +el.attachEvent("on"+_19f,func); +Xinha._eventFlushers.push([el,_19f,func]); +}; +Xinha._removeEvent=function(el,_1a2,func){ +el.detachEvent("on"+_1a2,func); +}; +Xinha._stopEvent=function(ev){ +try{ +ev.cancelBubble=true; +ev.returnValue=false; +} +catch(ex){ +} +}; +}else{ +Xinha._addEvent=function(el,_1a6,func){ +alert("_addEvent is not supported"); +}; +Xinha._removeEvent=function(el,_1a9,func){ +alert("_removeEvent is not supported"); +}; +Xinha._stopEvent=function(ev){ +alert("_stopEvent is not supported"); +}; +} +} +Xinha._addEvents=function(el,evs,func){ +for(var i=evs.length;--i>=0;){ +Xinha._addEvent(el,evs[i],func); +} +}; +Xinha._removeEvents=function(el,evs,func){ +for(var i=evs.length;--i>=0;){ +Xinha._removeEvent(el,evs[i],func); +} +}; +Xinha.addDom0Event=function(el,ev,fn){ +Xinha._prepareForDom0Events(el,ev); +el._xinha_dom0Events[ev].unshift(fn); +}; +Xinha.prependDom0Event=function(el,ev,fn){ +Xinha._prepareForDom0Events(el,ev); +el._xinha_dom0Events[ev].push(fn); +}; +Xinha._prepareForDom0Events=function(el,ev){ +if(typeof el._xinha_dom0Events=="undefined"){ +el._xinha_dom0Events={}; +Xinha.freeLater(el,"_xinha_dom0Events"); +} +if(typeof el._xinha_dom0Events[ev]=="undefined"){ +el._xinha_dom0Events[ev]=[]; +if(typeof el["on"+ev]=="function"){ +el._xinha_dom0Events[ev].push(el["on"+ev]); +} +el["on"+ev]=function(_1bc){ +var a=el._xinha_dom0Events[ev]; +var _1be=true; +for(var i=a.length;--i>=0;){ +el._xinha_tempEventHandler=a[i]; +if(el._xinha_tempEventHandler(_1bc)===false){ +el._xinha_tempEventHandler=null; +_1be=false; +break; +} +el._xinha_tempEventHandler=null; +} +return _1be; +}; +Xinha._eventFlushers.push([el,ev]); +} +}; +Xinha.prototype.notifyOn=function(ev,fn){ +if(typeof this._notifyListeners[ev]=="undefined"){ +this._notifyListeners[ev]=[]; +Xinha.freeLater(this,"_notifyListeners"); +} +this._notifyListeners[ev].push(fn); +}; +Xinha.prototype.notifyOf=function(ev,args){ +if(this._notifyListeners[ev]){ +for(var i=0;i0;){ +if(cls[--i]!=_1c6){ +ar[ar.length]=cls[i]; +} +} +el.className=ar.join(" "); +}; +Xinha._addClass=function(el,_1cb){ +Xinha._removeClass(el,_1cb); +el.className+=" "+_1cb; +}; +Xinha._hasClass=function(el,_1cd){ +if(!(el&&el.className)){ +return false; +} +var cls=el.className.split(" "); +for(var i=cls.length;i>0;){ +if(cls[--i]==_1cd){ +return true; +} +} +return false; +}; +Xinha._blockTags=" body form textarea fieldset ul ol dl li div "+"p h1 h2 h3 h4 h5 h6 quote pre table thead "+"tbody tfoot tr td th iframe address blockquote "; +Xinha.isBlockElement=function(el){ +return el&&el.nodeType==1&&(Xinha._blockTags.indexOf(" "+el.tagName.toLowerCase()+" ")!=-1); +}; +Xinha._paraContainerTags=" body td th caption fieldset div"; +Xinha.isParaContainer=function(el){ +return el&&el.nodeType==1&&(Xinha._paraContainerTags.indexOf(" "+el.tagName.toLowerCase()+" ")!=-1); +}; +Xinha._closingTags=" a abbr acronym address applet b bdo big blockquote button caption center cite code del dfn dir div dl em fieldset font form frameset h1 h2 h3 h4 h5 h6 i iframe ins kbd label legend map menu noframes noscript object ol optgroup pre q s samp script select small span strike strong style sub sup table textarea title tt u ul var "; +Xinha.needsClosingTag=function(el){ +return el&&el.nodeType==1&&(Xinha._closingTags.indexOf(" "+el.tagName.toLowerCase()+" ")!=-1); +}; +Xinha.htmlEncode=function(str){ +if(typeof str.replace=="undefined"){ +str=str.toString(); +} +str=str.replace(/&/ig,"&"); +str=str.replace(//ig,">"); +str=str.replace(/\xA0/g," "); +str=str.replace(/\x22/g,"""); +return str; +}; +Xinha.prototype.stripBaseURL=function(_1d4){ +if(this.config.baseHref===null||!this.config.stripBaseHref){ +return _1d4; +} +var _1d5=this.config.baseHref.replace(/^(https?:\/\/[^\/]+)(.*)$/,"$1"); +var _1d6=new RegExp(_1d5); +return _1d4.replace(_1d6,""); +}; +String.prototype.trim=function(){ +return this.replace(/^\s+/,"").replace(/\s+$/,""); +}; +Xinha._makeColor=function(v){ +if(typeof v!="number"){ +return v; +} +var r=v&255; +var g=(v>>8)&255; +var b=(v>>16)&255; +return "rgb("+r+","+g+","+b+")"; +}; +Xinha._colorToRgb=function(v){ +if(!v){ +return ""; +} +var r,g,b; +function hex(d){ +return (d<16)?("0"+d.toString(16)):d.toString(16); +} +if(typeof v=="number"){ +r=v&255; +g=(v>>8)&255; +b=(v>>16)&255; +return "#"+hex(r)+hex(g)+hex(b); +} +if(v.substr(0,3)=="rgb"){ +var re=/rgb\s*\(\s*([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\s*\)/; +if(v.match(re)){ +r=parseInt(RegExp.$1,10); +g=parseInt(RegExp.$2,10); +b=parseInt(RegExp.$3,10); +return "#"+hex(r)+hex(g)+hex(b); +} +return null; +} +if(v.substr(0,1)=="#"){ +return v; +} +return null; +}; +Xinha.prototype._popupDialog=function(url,_1e0,init){ +Dialog(this.popupURL(url),_1e0,init); +}; +Xinha.prototype.imgURL=function(file,_1e3){ +if(typeof _1e3=="undefined"){ +return _editor_url+file; +}else{ +return _editor_url+"plugins/"+_1e3+"/img/"+file; +} +}; +Xinha.prototype.popupURL=function(file){ +var url=""; +if(file.match(/^plugin:\/\/(.*?)\/(.*)/)){ +var _1e6=RegExp.$1; +var _1e7=RegExp.$2; +if(!(/\.html$/.test(_1e7))){ +_1e7+=".html"; +} +url=_editor_url+"plugins/"+_1e6+"/popups/"+_1e7; +}else{ +if(file.match(/^\/.*?/)){ +url=file; +}else{ +url=_editor_url+this.config.popupURL+file; +} +} +return url; +}; +Xinha.getElementById=function(tag,id){ +var el,i,objs=document.getElementsByTagName(tag); +for(i=objs.length;--i>=0&&(el=objs[i]);){ +if(el.id==id){ +return el; +} +} +return null; +}; +Xinha.prototype._toggleBorders=function(){ +var _1eb=this._doc.getElementsByTagName("TABLE"); +if(_1eb.length!==0){ +if(!this.borders){ +this.borders=true; +}else{ +this.borders=false; +} +for(var i=0;i<_1eb.length;i++){ +if(this.borders){ +Xinha._addClass(_1eb[i],"htmtableborders"); +}else{ +Xinha._removeClass(_1eb[i],"htmtableborders"); +} +} +} +return true; +}; +Xinha.addCoreCSS=function(html){ +var _1ee="\n"; +if(html&&//i.test(html)){ +return html.replace(//i,""+_1ee); +}else{ +if(html){ +return _1ee+html; +}else{ +return _1ee; +} +} +}; +Xinha.stripCoreCSS=function(html){ +return html.replace(/]+title="Xinha Internal CSS"(.|\n)*?<\/style>/i,""); +}; +Xinha.addClasses=function(el,_1f1){ +if(el!==null){ +var _1f2=el.className.trim().split(" "); +var ours=_1f1.split(" "); +for(var x=0;x"+s+""); +} +} +Xinha.arrayContainsArray=function(a1,a2){ +var _210=true; +for(var x=0;x>2; +enc2=((chr1&3)<<4)|(chr2>>4); +enc3=((chr2&15)<<2)|(chr3>>6); +enc4=chr3&63; +if(isNaN(chr2)){ +enc3=enc4=64; +}else{ +if(isNaN(chr3)){ +enc4=64; +} +} +_23f=_23f+_23e.charAt(enc1)+_23e.charAt(enc2)+_23e.charAt(enc3)+_23e.charAt(enc4); +}while(i<_23d.length); +return _23f; +}; +Xinha.base64_decode=function(_243){ +var _244="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="; +var _245=""; +var chr1,chr2,chr3; +var enc1,enc2,enc3,enc4; +var i=0; +_243=_243.replace(/[^A-Za-z0-9\+\/\=]/g,""); +do{ +enc1=_244.indexOf(_243.charAt(i++)); +enc2=_244.indexOf(_243.charAt(i++)); +enc3=_244.indexOf(_243.charAt(i++)); +enc4=_244.indexOf(_243.charAt(i++)); +chr1=(enc1<<2)|(enc2>>4); +chr2=((enc2&15)<<4)|(enc3>>2); +chr3=((enc3&3)<<6)|enc4; +_245=_245+String.fromCharCode(chr1); +if(enc3!=64){ +_245=_245+String.fromCharCode(chr2); +} +if(enc4!=64){ +_245=_245+String.fromCharCode(chr3); +} +}while(i<_243.length); +return _245; +}; +Xinha.removeFromParent=function(el){ +if(!el.parentNode){ +return; +} +var pN=el.parentNode; +pN.removeChild(el); +return el; +}; +Xinha.hasParentNode=function(el){ +if(el.parentNode){ +if(el.parentNode.nodeType==11){ +return false; +} +return true; +} +return false; +}; +Xinha.viewportSize=function(_24c){ +_24c=(_24c)?_24c:window; +var x,y; +if(_24c.innerHeight){ +x=_24c.innerWidth; +y=_24c.innerHeight; +}else{ +if(_24c.document.documentElement&&_24c.document.documentElement.clientHeight){ +x=_24c.document.documentElement.clientWidth; +y=_24c.document.documentElement.clientHeight; +}else{ +if(_24c.document.body){ +x=_24c.document.body.clientWidth; +y=_24c.document.body.clientHeight; +} +} +} +return {"x":x,"y":y}; +}; +Xinha.prototype.scrollPos=function(_24e){ +_24e=(_24e)?_24e:window; +var x,y; +if(_24e.pageYOffset){ +x=_24e.pageXOffset; +y=_24e.pageYOffset; +}else{ +if(_24e.document.documentElement&&document.documentElement.scrollTop){ +x=_24e.document.documentElement.scrollLeft; +y=_24e.document.documentElement.scrollTop; +}else{ +if(_24e.document.body){ +x=_24e.document.body.scrollLeft; +y=_24e.document.body.scrollTop; +} +} +} +return {"x":x,"y":y}; +}; +Xinha.getElementTopLeft=function(_250){ +var _251={top:0,left:0}; +while(_250){ +_251.top+=_250.offsetTop; +_251.left+=_250.offsetLeft; +if(_250.offsetParent&&_250.offsetParent.tagName.toLowerCase()!="body"){ +_250=_250.offsetParent; +}else{ +_250=null; +} +} +return _251; +}; +Xinha.findPosX=function(obj){ +var _253=0; +if(obj.offsetParent){ +return Xinha.getElementTopLeft(obj).left; +}else{ +if(obj.x){ +_253+=obj.x; +} +} +return _253; +}; +Xinha.findPosY=function(obj){ +var _255=0; +if(obj.offsetParent){ +return Xinha.getElementTopLeft(obj).top; +}else{ +if(obj.y){ +_255+=obj.y; +} +} +return _255; +}; +Xinha.prototype.setLoadingMessage=function(_256,_257,_258){ +if(!this.config.showLoading||!document.getElementById("loading_sub_"+this._textArea.name)){ +return; +} +var elt=document.getElementById("loading_sub_"+this._textArea.name); +elt.innerHTML=Xinha._lc(_256,_257,_258); +}; +Xinha.prototype.removeLoadingMessage=function(){ +if(!this.config.showLoading||!document.getElementById("loading_"+this._textArea.name)){ +return; +} +document.body.removeChild(document.getElementById("loading_"+this._textArea.name)); +}; +Xinha.toFree=[]; +Xinha.freeLater=function(obj,prop){ +Xinha.toFree.push({o:obj,p:prop}); +}; +Xinha.free=function(obj,prop){ +if(obj&&!prop){ +for(var p in obj){ +Xinha.free(obj,p); +} +}else{ +if(obj){ +try{ +obj[prop]=null; +} +catch(x){ +} +} +} +}; +Xinha.collectGarbageForIE=function(){ +Xinha.flushEvents(); +for(var x=0;x 0 result in a horizontal scrollingbar while loading - // A few lines above seems to indicate offsetWidth is not always set - loading_message.style.width = textarea.offsetWidth + 'px'; - } - catch (ex) - { - // offsetWidth seems not set, so let's use this._initial_ta_size.w, but sometimes it may be too huge width - loading_message.style.width = this._initial_ta_size.w; - } - loading_message.style.left = Xinha.findPosX(textarea) + 'px'; - loading_message.style.top = (Xinha.findPosY(textarea) + parseInt(this._initial_ta_size.h, 10) / 2) + 'px'; - // main static message - var loading_main = document.createElement("div"); - loading_main.className = "loading_main"; - loading_main.id = "loading_main_" + textarea.name; - loading_main.appendChild(document.createTextNode(Xinha._lc("Loading in progress. Please wait !"))); - // sub dynamic message - var loading_sub = document.createElement("div"); - loading_sub.className = "loading_sub"; - loading_sub.id = "loading_sub_" + textarea.name; - loading_sub.appendChild(document.createTextNode(Xinha._lc("Constructing main object"))); - loading_message.appendChild(loading_main); - loading_message.appendChild(loading_sub); - document.body.appendChild(loading_message); - this.setLoadingMessage("Constructing object"); - } - - this._editMode = "wysiwyg"; - this.plugins = {}; - this._timerToolbar = null; - this._timerUndo = null; - this._undoQueue = [this.config.undoSteps]; - this._undoPos = -1; - this._customUndo = true; - this._mdoc = document; // cache the document, we need it in plugins - this.doctype = ''; - this.__htmlarea_id_num = __xinhas.length; - __xinhas[this.__htmlarea_id_num] = this; - - this._notifyListeners = {}; - - // Panels - var panels = - { - right: - { - on: true, - container: document.createElement('td'), - panels: [] - }, - left: - { - on: true, - container: document.createElement('td'), - panels: [] - }, - top: - { - on: true, - container: document.createElement('td'), - panels: [] - }, - bottom: - { - on: true, - container: document.createElement('td'), - panels: [] - } - }; - - for ( var i in panels ) - { - if(!panels[i].container) { continue; } // prevent iterating over wrong type - panels[i].div = panels[i].container; // legacy - panels[i].container.className = 'panels ' + i; - Xinha.freeLater(panels[i], 'container'); - Xinha.freeLater(panels[i], 'div'); - } - // finally store the variable - this._panels = panels; - - Xinha.freeLater(this, '_textArea'); - } -} - -Xinha.onload = function() { }; -Xinha.init = function() { Xinha.onload(); }; - -// cache some regexps -Xinha.RE_tagName = /(<\/|<)\s*([^ \t\n>]+)/ig; -Xinha.RE_doctype = /()\n?/i; -Xinha.RE_head = /((.|\n)*?)<\/head>/i; -Xinha.RE_body = /]*>((.|\n|\r|\t)*?)<\/body>/i; -Xinha.RE_Specials = /([\/\^$*+?.()|{}[\]])/g; -Xinha.RE_email = /[_a-zA-Z\d\-\.]{3,}@[_a-zA-Z\d\-]{2,}(\.[_a-zA-Z\d\-]{2,})+/i; -Xinha.RE_url = /(https?:\/\/)?(([a-z0-9_]+:[a-z0-9_]+@)?[a-z0-9_-]{2,}(\.[a-z0-9_-]{2,}){2,}(:[0-9]+)?(\/\S+)*)/i; - -Xinha.Config = function() -{ - var cfg = this; - this.version = Xinha.version.Revision; - - // Width and Height - // you may set these as follows - // width = 'auto' -- the width of the original textarea will be used - // width = 'toolbar' -- the width of the toolbar will be used - // width = '' -- use any css measurement, eg width = '75%' - // - // height = 'auto' -- the height of the original textarea - // height = '' -- any css measurement, eg height = '480px' - this.width = "auto"; - this.height = "auto"; - - // the next parameter specifies whether the toolbar should be included - // in the size above, or are extra to it. If false then it's recommended - // to have explicit pixel sizes above (or on your textarea and have auto above) - this.sizeIncludesBars = true; - - // the next parameter specifies whether the panels should be included - // in the size above, or are extra to it. If false then it's recommended - // to have explicit pixel sizes above (or on your textarea and have auto above) - this.sizeIncludesPanels = true; - - // each of the panels has a dimension, for the left/right it's the width - // for the top/bottom it's the height. - // - // WARNING: PANEL DIMENSIONS MUST BE SPECIFIED AS PIXEL WIDTHS - this.panel_dimensions = - { - left: '200px', // Width - right: '200px', - top: '100px', // Height - bottom: '100px' - }; - - // enable creation of a status bar? - this.statusBar = true; - - // intercept ^V and use the Xinha paste command - // If false, then passes ^V through to browser editor widget - this.htmlareaPaste = false; - - this.mozParaHandler = 'best'; // set to 'built-in', 'dirty' or 'best' - // built-in: will (may) use 'br' instead of 'p' tags - // dirty : will use p and work good enough for the majority of cases, - // best : works the best, but it's about 12kb worth of javascript - // and will probably be slower than 'dirty'. This is the "EnterParagraphs" - // plugin from "hipikat", rolled in to be part of the core code - - - // possible values - // 'DOMwalk' (the "original") - // 'TransformInnerHTML' (this used to be the GetHtml plugin) - this.getHtmlMethod = 'DOMwalk'; - - // maximum size of the undo queue - this.undoSteps = 20; - - // the time interval at which undo samples are taken - this.undoTimeout = 500; // 1/2 sec. - - // set this to true if you want to explicitly right-justify when - // setting the text direction to right-to-left - this.changeJustifyWithDirection = false; - - // if true then Xinha will retrieve the full HTML, starting with the - // tag. - this.fullPage = false; - - // style included in the iframe document - this.pageStyle = ""; - - // external stylesheets to load (REFERENCE THESE ABSOLUTELY) - this.pageStyleSheets = []; - - // specify a base href for relative links - this.baseHref = null; - - // when the editor is in different directory depth as the edited page relative image sources - // will break the display of your images - // this fixes an issue where Mozilla converts the urls of images and links that are on the same server - // to relative ones (../) when dragging them around in the editor (Ticket #448) - this.expandRelativeUrl = true; - - // we can strip the base href out of relative links to leave them relative, reason for this - // especially if you don't specify a baseHref is that mozilla at least (& IE ?) will prefix - // the baseHref to any relative links to make them absolute, which isn't what you want most the time. - this.stripBaseHref = true; - - // and we can strip the url of the editor page from named links (eg ...) - // reason for this is that mozilla at least (and IE ?) prefixes location.href to any - // that don't have a url prefixing them - this.stripSelfNamedAnchors = true; - - // sometimes high-ascii in links can cause problems for servers (basically they don't recognise them) - // so you can use this flag to ensure that all characters other than the normal ascii set (actually - // only ! through ~) are escaped in URLs to % codes - this.only7BitPrintablesInURLs = true; - - // if you are putting the HTML written in Xinha into an email you might want it to be 7-bit - // characters only. This config option (off by default) will convert all characters consuming - // more than 7bits into UNICODE decimal entity references (actually it will convert anything - // below (chr 20) except cr, lf and tab and above (~, chr 7E)) - this.sevenBitClean = false; - - // sometimes we want to be able to replace some string in the html comng in and going out - // so that in the editor we use the "internal" string, and outside and in the source view - // we use the "external" string this is useful for say making special codes for - // your absolute links, your external string might be some special code, say "{server_url}" - // an you say that the internal represenattion of that should be http://your.server/ - this.specialReplacements = {}; // { 'external_string' : 'internal_string' } - - // set to true if you want Word code to be cleaned upon Paste - this.killWordOnPaste = true; - - // enable the 'Target' field in the Make Link dialog - this.makeLinkShowsTarget = true; - - // CharSet of the iframe, default is the charset of the document - this.charSet = Xinha.is_gecko ? document.characterSet : document.charset; - - // URL-s - this.imgURL = "images/"; - this.popupURL = "popups/"; - - // remove tags (these have to be a regexp, or null if this functionality is not desired) - this.htmlRemoveTags = null; - - // Turning this on will turn all "linebreak" and "separator" items in your toolbar into soft-breaks, - // this means that if the items between that item and the next linebreak/separator can - // fit on the same line as that which came before then they will, otherwise they will - // float down to the next line. - - // If you put a linebreak and separator next to each other, only the separator will - // take effect, this allows you to have one toolbar that works for both flowToolbars = true and false - // infact the toolbar below has been designed in this way, if flowToolbars is false then it will - // create explictly two lines (plus any others made by plugins) breaking at justifyleft, however if - // flowToolbars is false and your window is narrow enough then it will create more than one line - // even neater, if you resize the window the toolbars will reflow. Niiiice. - - this.flowToolbars = true; - - // set to true if you want the loading panel to show at startup - this.showLoading = false; - - // set to false if you want to allow JavaScript in the content, otherwise '); \ No newline at end of file Index: openacs-4/packages/acs-templating/www/resources/xinha-nightly/release-notes.txt =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/www/resources/xinha-nightly/release-notes.txt,v diff -u -N -r1.1 -r1.2 --- openacs-4/packages/acs-templating/www/resources/xinha-nightly/release-notes.txt 2 Feb 2007 21:04:45 -0000 1.1 +++ openacs-4/packages/acs-templating/www/resources/xinha-nightly/release-notes.txt 25 Feb 2007 19:06:05 -0000 1.2 @@ -21,6 +21,35 @@ Xinha.loadPlugins() in xinha_init function - fixed Ticket #911 Background color does not work in Firefox - fixed Ticket #912 an error is thrown in Mozilla when clicking merge cells button and fewer than 2 cells are selected + - fixed Ticket #816 CharacterMap and ListType panel modes make editor jump to top in IE + - fixed Ticket #917 getHTMLWrapper in IE renders attributes like _stylist_usedtobe="[object Object]" + - fixed Ticket #556 stripBaseHref didn't work without baseHref defined explicitly. + - Update InsertPicture plugin Update + - fixed Ticket #921 EFM extended file manager - iframe height problem (IE) + - Ticket #923 colorPicker face lift & localisation + - fixed Ticket #924 EFM + ImageManager re-transforming of url to original image after automatic resize broken + - Ticket #900- retain editing position position between modes + - fixed Ticket #928 ImageManager fails if (another) Files.php exists in include path + - fixed Ticket #935 EFM demo_images php upload allowed: possible security risk + - Ticket #939 Japanese langage support + - fixed Ticket #3 Horizontal Rule Selection + - Plugin ExtendedFileManager: added doc to allowed upload extensions + - Plugin PasteText update + - Plugin HtmlEntities: default preset iso-8859-1 + - fixed Ticket #948 IE: inline styles are not rendered by DOMwalk getHTML() + - Plugin HorizontalRule update + - Plugin SaveSubmit update + - Plugin Linker update + - fixed Ticket #823 editor contents was not submitted when using JavaScript form.submit() without prior form.onsubmit() + - fixed Ticket #459 all body attributes removed in full page mode in FireFox + - _editor_url is now converted to absolute if it is relative. + - fixed Ticket #594 IE: insertHTML() inserts HTML outside editor when editor is not focussed + - Ticket #954 FullScreen mode can now be called programmatically or on startup with or without button + - fixed Ticket #321 FullScreen : select elements show through in IE6 + - fixed Ticket #953 Statusbar has ugly white gap at the bottom when switching back from full screen in IE + - fixed Ticket #952 FullScreen: scrollbars don't disappear in IE in QuirksMode + - fixed Ticket #603 Popop Dialog Height problems + - fixed Ticket #955 DOMwalk getHTML outputs empty attribute with value "true" instead of attribute name and some are skipped at all Xinha 0.91beta - changed namespace from HTMLArea to Xinha Index: openacs-4/packages/acs-templating/www/resources/xinha-nightly/examples/custom.css =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/www/resources/xinha-nightly/examples/custom.css,v diff -u -N -r1.3 -r1.4 --- openacs-4/packages/acs-templating/www/resources/xinha-nightly/examples/custom.css 2 Feb 2007 21:04:45 -0000 1.3 +++ openacs-4/packages/acs-templating/www/resources/xinha-nightly/examples/custom.css 25 Feb 2007 19:06:05 -0000 1.4 @@ -3,8 +3,8 @@ -- when the CSS plugin is included in an auto-generated example. -- @TODO Make this CSS more useful. -- - -- $HeadURL: http://svn.xinha.python-hosting.com/trunk/examples/custom.css $ - -- $LastChangedDate: 2007-01-20 11:24:36 +1300 (Sat, 20 Jan 2007) $ + -- $HeadURL: http://svn.xinha.python-hosting.com/tags/0.92beta/examples/custom.css $ + -- $LastChangedDate: 2007-01-19 23:24:36 +0100 (Fr, 19 Jan 2007) $ -- $LastChangedRevision: 677 $ -- $LastChangedBy: ray $ --------------------------------------------------------------------------*/ Index: openacs-4/packages/acs-templating/www/resources/xinha-nightly/examples/dynamic.css =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/www/resources/xinha-nightly/examples/dynamic.css,v diff -u -N -r1.3 -r1.4 --- openacs-4/packages/acs-templating/www/resources/xinha-nightly/examples/dynamic.css 2 Feb 2007 21:04:45 -0000 1.3 +++ openacs-4/packages/acs-templating/www/resources/xinha-nightly/examples/dynamic.css 25 Feb 2007 19:06:05 -0000 1.4 @@ -3,8 +3,8 @@ -- when the DynamicCSS plugin is included in an auto-generated example. -- @TODO Make this CSS more useful. -- - -- $HeadURL: http://svn.xinha.python-hosting.com/trunk/examples/dynamic.css $ - -- $LastChangedDate: 2007-01-20 11:24:36 +1300 (Sat, 20 Jan 2007) $ + -- $HeadURL: http://svn.xinha.python-hosting.com/tags/0.92beta/examples/dynamic.css $ + -- $LastChangedDate: 2007-01-19 23:24:36 +0100 (Fr, 19 Jan 2007) $ -- $LastChangedRevision: 677 $ -- $LastChangedBy: ray $ --------------------------------------------------------------------------*/ Index: openacs-4/packages/acs-templating/www/resources/xinha-nightly/examples/ext_example-body.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/www/resources/xinha-nightly/examples/ext_example-body.html,v diff -u -N -r1.4 -r1.5 --- openacs-4/packages/acs-templating/www/resources/xinha-nightly/examples/ext_example-body.html 2 Feb 2007 21:04:45 -0000 1.4 +++ openacs-4/packages/acs-templating/www/resources/xinha-nightly/examples/ext_example-body.html 25 Feb 2007 19:06:05 -0000 1.5 @@ -3,8 +3,8 @@ Index: openacs-4/packages/acs-templating/www/resources/xinha-nightly/examples/ext_example-menu.php =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/www/resources/xinha-nightly/examples/ext_example-menu.php,v diff -u -N -r1.4 -r1.5 --- openacs-4/packages/acs-templating/www/resources/xinha-nightly/examples/ext_example-menu.php 2 Feb 2007 21:04:45 -0000 1.4 +++ openacs-4/packages/acs-templating/www/resources/xinha-nightly/examples/ext_example-menu.php 25 Feb 2007 19:06:05 -0000 1.5 @@ -10,10 +10,10 @@ -- frame to provide a menu for generating example editors using -- full_example-body.html, and full_example.js. -- - -- $HeadURL: http://svn.xinha.python-hosting.com/trunk/examples/ext_example-menu.php $ - -- $LastChangedDate: 2007-01-20 11:24:36 +1300 (Sat, 20 Jan 2007) $ - -- $LastChangedRevision: 677 $ - -- $LastChangedBy: ray $ + -- $HeadURL: http://svn.xinha.python-hosting.com/tags/0.92beta/examples/ext_example-menu.php $ + -- $LastChangedDate: 2007-02-07 20:12:42 +0100 (Mi, 07 Feb 2007) $ + -- $LastChangedRevision: 715 $ + -- $LastChangedBy: htanaka $ ---------------------------------------------------------------------------> @@ -234,6 +234,7 @@ +