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 -r1.4 -r1.5 --- openacs-4/packages/acs-templating/www/resources/xinha-nightly/Xinha.css 13 May 2008 18:53:44 -0000 1.4 +++ openacs-4/packages/acs-templating/www/resources/xinha-nightly/Xinha.css 16 Jan 2009 08:36:12 -0000 1.5 @@ -1,273 +1,2 @@ -.htmlarea { background: #fff; } -.htmlarea td { margin:0;padding:0; } - -.htmlarea .toolbarRow { - width:1px; -} - -.htmlarea .toolbar { - cursor: default; - background: ButtonFace; - padding: 3px; - border: 1px solid; - border-color: ButtonHighlight ButtonShadow ButtonShadow ButtonHighlight; -} -.htmlarea .toolbar table { margin: 0; font-family: tahoma,verdana,sans-serif; font-size: 11px; } -.htmlarea .toolbar img { border: none; vertical-align: top; } -.htmlarea .toolbar .label { padding: 0px 3px; } - -.htmlarea .toolbar .button { - background: ButtonFace; - color: ButtonText; - border: 1px solid ButtonFace; - padding: 1px; - margin: 0px; - width: 18px; - height: 18px; -} -.htmlarea .toolbar a.button:hover { - border: 1px solid; - border-color: ButtonHighlight ButtonShadow ButtonShadow ButtonHighlight; -} -.htmlarea .toolbar a.buttonDisabled:hover { - border-color: ButtonFace; -} -.htmlarea .toolbar .buttonActive, -.htmlarea .toolbar .buttonPressed -{ - padding: 2px 0px 0px 2px; - border: 1px solid; - border-color: ButtonShadow ButtonHighlight ButtonHighlight ButtonShadow; -} -.htmlarea .toolbar .buttonPressed { - background: ButtonHighlight; -} -.htmlarea .toolbar .indicator { - padding: 0px 3px; - overflow: hidden; - width: 20px; - text-align: center; - cursor: default; - border: 1px solid ButtonShadow; -} - -.htmlarea .toolbar .buttonDisabled img { - filter: gray() alpha(opacity = 25); - -moz-opacity: 0.25; - opacity: 0.25; -} - -.htmlarea .toolbar .separator { - /*position: relative;*/ - margin:0 3px; - border-left: 1px solid ButtonShadow; - border-right: 1px solid ButtonHighlight; - width: 0px; - height: 18px; - padding: 0px; -} - -.htmlarea .toolbar .space { width: 5px; } - -.htmlarea .toolbar select, .htmlarea .toolbar option { font: 11px Tahoma,Verdana,sans-serif;} - -.htmlarea .toolbar select, -.htmlarea .toolbar select:hover, -.htmlarea .toolbar select:active { - position:relative; - top:-2px; - margin-bottom:-2px; - color: ButtonText; -} - -.htmlarea iframe.xinha_iframe, .htmlarea textarea.xinha_textarea -{ - border: none; /*1px solid;*/ -} - -.htmlarea .statusBar { - border: 1px solid; - border-color: ButtonShadow ButtonHighlight ButtonHighlight ButtonShadow; - padding: 2px 4px; - background-color: ButtonFace; - color: ButtonText; - font: 11px Tahoma,Verdana,sans-serif; - height:16px; -} - -.htmlarea .statusBar .statusBarTree a { - padding: 2px 5px; - color: #00f; -} - -.htmlarea .statusBar .statusBarTree a:visited { color: #00f; } -.htmlarea .statusBar .statusBarTree a:hover { - background-color: Highlight; - color: HighlightText; - padding: 1px 4px; - border: 1px solid HighlightText; -} - - -/* popup dialogs */ - -.dialog { - color: ButtonText; - background: ButtonFace; -} - -.dialog .content { padding: 2px; } - -.dialog, .dialog button, .dialog input, .dialog select, .dialog textarea, .dialog table { - font: 11px Tahoma,Verdana,sans-serif; -} - -.dialog table { border-collapse: collapse; } - -.dialog .title, .dialog h1 -{ - background: #008; - color: #ff8; - border-bottom: 1px solid #000; - padding: 1px 0px 2px 5px; - font-size: 12px; - font-weight: bold; - cursor: default; -} -.dialog h1 { margin:0px;} -.dialog .title .button { - float: right; - border: 1px solid #66a; - padding: 0px 1px 0px 2px; - margin-right: 1px; - color: #fff; - text-align: center; -} - -.dialog .title .button-hilite { border-color: #88f; background: #44c; } - -.dialog button { - width: 5em; - padding: 0px; -} - -.dialog .buttonColor { - width :1em; - padding: 1px; - cursor: default; - border: 1px solid; - border-color: ButtonHighlight ButtonShadow ButtonShadow ButtonHighlight; -} - -.dialog .buttonColor .chooser, .dialog .buttonColor .nocolor { - height: 0.6em; - border: 1px solid; - padding: 0px 1em; - border-color: ButtonShadow ButtonHighlight ButtonHighlight ButtonShadow; -} - -.dialog .buttonClick { - border-color: ButtonShadow ButtonHighlight ButtonHighlight ButtonShadow; -} -.dialog .buttonColor-hilite { - border-color: ButtonShadow ButtonHighlight ButtonHighlight ButtonShadow; -} - -.dialog .buttonColor .nocolor { padding: 0px; } -.dialog .buttonColor .nocolor-hilite { background-color: #fff; color: #f00; } - -.dialog .label { text-align: right; width: 6em; } -.dialog .value input { width: 100%; } -.dialog .buttons { text-align: right; padding: 2px 4px 0px 4px; } - -.dialog legend { font-weight: bold; } -.dialog fieldset table { margin: 2px 0px; } - -.popupwin { - padding: 0px; - margin: 0px; -} - -.popupwin .title { - background: #fff; - color: #000; - font-weight: bold; - font-size: 120%; - padding: 3px 10px; - margin-bottom: 10px; - border-bottom: 1px solid black; - letter-spacing: 2px; -} - -form { margin: 0px; border: none; } - - -/** Panels **/ -.htmlarea .panels.top -{ - border-bottom : 1px solid; - border-color: ButtonShadow; -} - -.htmlarea .panels.right -{ - border-left : 1px solid; - border-color: ButtonShadow; -} - -.htmlarea .panels.left -{ - border-right : 1px solid; - border-color: ButtonShadow; -} - -.htmlarea .panels.bottom -{ - border-top : 1px solid; - border-color: ButtonShadow; -} - -.htmlarea .panel h1 { - background: ButtonFace; - border: 1px solid; - border-color: ButtonHighlight ButtonShadow ButtonShadow ButtonHighlight; - margin: 0px; - padding: 0px; - font-size:100%; - font-weight:bold; - padding: 2px; - clear:left; - -} - -.htmlarea .panel { overflow:hidden; } -.htmlarea .panels.left .panel { border-right:none; border-left:none; } -.htmlarea .panels.left h1 { border-right:none; } -.htmlarea .panels.right .panel { border-right:none; border-left:none; } -.htmlarea .panels.left h1 { border-left:none; } -.htmlarea { border: 1px solid black; } - -.loading -{ - font-family:sans-serif; - position:absolute; - z-index:998; - text-align:center; - width:212px; - padding: 55px 0 5px 0; - border:2px solid #ccc; - /* border-color: ButtonHighlight ButtonShadow ButtonShadow ButtonHighlight;*/ - background: url(images/xinha_logo.gif) no-repeat #fff center 5px; -} -.loading_main -{ - font-size:11px; - color:#000; - -} -.loading_sub -{ - font-size:9px; - color:#666; - text-align:center; -} +/* This compressed file is part of Xinha. For uncomressed sources, forum, and bug reports, go to xinha.org */ +.htmlarea{background:#fff;}.htmlarea td{margin:0;padding:0;}.htmlarea .toolbarRow{width:1px;}.htmlarea .toolbar{cursor:default;background:ButtonFace;padding:3px;border:1px solid;border-color:ButtonHighlight ButtonShadow ButtonShadow ButtonHighlight;}.htmlarea .toolbar table{margin:0;font-family:Tahoma,Verdana,sans-serif;font-size:11px;}.htmlarea .toolbar img{border:none;vertical-align:top;}.htmlarea .toolbar .label{padding:0 3px;}.htmlarea .toolbar .button{background:ButtonFace;color:ButtonText;border:1px solid ButtonFace;padding:1px;margin:0;width:18px;height:18px;}.htmlarea .toolbar a.button:hover{border:1px solid;border-color:ButtonHighlight ButtonShadow ButtonShadow ButtonHighlight;}.htmlarea .toolbar a.buttonDisabled:hover{border-color:ButtonFace;}.htmlarea .toolbar .buttonActive,.htmlarea .toolbar .buttonPressed{padding:2px 0 0 2px;border:1px solid;border-color:ButtonShadow ButtonHighlight ButtonHighlight ButtonShadow;}.htmlarea .toolbar .buttonPressed{background:ButtonHighlight;}.htmlarea .toolbar .indicator{padding:0 3px;overflow:hidden;width:20px;text-align:center;cursor:default;border:1px solid ButtonShadow;}.htmlarea .toolbar .buttonDisabled img{filter:gray() alpha(opacity = 25);-moz-opacity:.25;opacity:.25;}.htmlarea .toolbar .separator{margin:0 3px;border-left:1px solid ButtonShadow;border-right:1px solid ButtonHighlight;width:0;height:18px;padding:0;}.htmlarea .toolbar .space{width:5px;}.htmlarea .toolbar select,.htmlarea .toolbar option{font:11px Tahoma,Verdana,sans-serif;}.htmlarea .toolbar select,.htmlarea .toolbar select:hover,.htmlarea .toolbar select:active{position:relative;top:-2px;margin-bottom:-2px;color:ButtonText;}.htmlarea iframe.xinha_iframe,.htmlarea textarea.xinha_textarea{border:none;}.htmlarea .statusBar{border:1px solid;border-color:ButtonShadow ButtonHighlight ButtonHighlight ButtonShadow;padding:2px 4px;background-color:ButtonFace;color:ButtonText;font:11px Tahoma,Verdana,sans-serif;height:16px;overflow:hidden;}.htmlarea .statusBar .statusBarTree a{padding:2px 5px;color:#00f;}.htmlarea .statusBar .statusBarTree a:visited{color:#00f;}.htmlarea .statusBar .statusBarTree a:hover{background-color:Highlight;color:HighlightText;padding:1px 4px;border:1px solid HighlightText;}.statusBarWidgetContainer{background-color:ButtonFace;}.dialog{color:ButtonText;background:ButtonFace;border:1px outset;border-color:WindowFrame;}div.dialog{padding-bottom:10px;border-radius:8px 8px 0 0;-moz-border-radius:8px 8px 0 0;-webkit-border-top-left-radius:8px;-webkit-border-top-right-radius:8px;box-shadow:4px 4px 5px #888;-moz-box-shadow:4px 4px 5px #888;-webkit-box-shadow:4px 4px 5px #888;}div.dialog.modal{box-shadow:9px 9px 10px #444;-moz-box-shadow:9px 9px 10px #444;-webkit-box-shadow:9px 9px 10px #444;}div.dialog.chrome{-webkit-box-shadow:none!IMPORTANT;}.panels div.dialog.panel{border-radius:0;-moz-border-radius:0;-webkit-border-radius:0;box-shadow:none;-moz-box-shadow:none;-webkit-box-shadow:none;}.xinha_dialog_background{filter:alpha(opacity=0);-moz-opacity:0;opacity:0;border:none;}.xinha_dialog_background.modal.greyout{background-color:#666;filter:alpha(opacity=70)!IMPORTANT;-moz-opacity:.7;opacity:.7;}.xinha_dialog_background.modal{filter:alpha(opacity=0)!IMPORTANT;-moz-opacity:0;opacity:0;border:none;}body.xinha_dialog_background.modal.greyout{filter:alpha(opacity=100)!IMPORTANT;}body.xinha_dialog_background.modal{filter:alpha(opacity=0);}.dialog .content{padding:2px;}.dialog,.dialog button,.dialog input,.dialog select,.dialog textarea,.dialog table{font:11px Tahoma,Verdana,sans-serif;}.dialog table{border-collapse:collapse;}.dialog .title,.dialog h1{background:ActiveCaption;color:CaptionText;border-bottom:1px solid #000;padding:1px 0 2px 5px;font-size:12px;font-weight:bold;cursor:default;letter-spacing:.01em;}.dialog h1{margin:0;border-radius:8px 8px 0 0;-moz-border-radius:8px 8px 0 0;-webkit-border-top-left-radius:8px;-webkit-border-top-right-radius:8px;}.panels .dialog.panel h1{-moz-border-radius:0;-webkit-border-radius:0;}.dialog .title .button{float:right;border:1px solid #66a;padding:0 1px 0 2px;margin-right:1px;color:#fff;text-align:center;}.dialog .title .button-hilite{border-color:#88f;background:#44c;}.dialog button{width:5.5em;padding:0;}.dialog .closeButton{padding:0;cursor:default;border:1px solid;border-color:ButtonHighlight ButtonShadow ButtonShadow ButtonHighlight;height:11px;width:11px;vertical-align:top;position:absolute;top:3px;right:2px;background-color:ButtonFace;color:ButtonText;font-size:13px;font-family:Tahoma,Verdana,sans-serif;text-align:center;letter-spacing:0;overflow:hidden;}.dialog .buttonColor{width:1em;padding:1px;cursor:default;border:1px solid;border-color:ButtonHighlight ButtonShadow ButtonShadow ButtonHighlight;}.dialog .buttonColor .chooser,.dialog .buttonColor .nocolor{height:.6em;border:1px solid;padding:0 1em;border-color:ButtonShadow ButtonHighlight ButtonHighlight ButtonShadow;}.dialog .buttonClick{border-color:ButtonShadow ButtonHighlight ButtonHighlight ButtonShadow;}.dialog .buttonColor-hilite{border-color:ButtonShadow ButtonHighlight ButtonHighlight ButtonShadow;}.dialog .buttonColor .nocolor{padding:0;}.dialog .buttonColor .nocolor-hilite{background-color:#fff;color:#f00;}.dialog .label{text-align:right;width:6em;}.dialog .value input{width:100%;}.dialog legend{font-weight:bold;}.dialog fieldset table{margin:2px 0;}.dialog .buttons{padding:1em;text-align:center;}.dialog .resizeHandle{-moz-appearance:resizer;width:12px;height:12px;border-bottom:2px solid #000;border-right:2px solid #000;cursor:se-resize;}.popupwin{padding:0;margin:0;}.popupwin .title{background:#fff;color:#000;font-weight:bold;font-size:120%;padding:3px 10px;margin-bottom:10px;border-bottom:1px solid black;letter-spacing:2px;}form{margin:0;border:none;}.htmlarea .panels_top{border-bottom:1px solid;border-color:ButtonShadow;}.htmlarea .panels_right{border-left:1px solid;border-color:ButtonShadow;}.htmlarea .panels_left{border-right:1px solid;border-color:ButtonShadow;}.htmlarea .panels_bottom{border-top:1px solid;border-color:ButtonShadow;}.htmlarea .panel h1{clear:left;font-size:.9em;}.htmlarea .panel{overflow:hidden;background-color:white;padding-bottom:0!IMPORTANT;border:none!IMPORTANT;}.htmlarea .panels_left .panel{border-right:none;border-left:none;}.htmlarea .panels_left h1{border-right:none;}.htmlarea .panels_right .panel{border-right:none;border-left:none;}.htmlarea .panels_left h1{border-left:none;}.htmlarea{border:1px solid black;}.loading{font-family:sans-serif;position:absolute;z-index:998;text-align:center;width:212px;padding:55px 0 5px 0;border:2px solid #ccc;background:url(images/xinha_logo.gif) no-repeat #fff center 5px;}.loading_main{font-size:11px;color:#000;}.loading_sub{font-size:9px;color:#666;text-align:center;}.dialog a img{border:0 none transparent;}.dialog fieldset.collapsed{border:0 none transparent;}.dialog fieldset.collapsed form{display:none;}.hidden{display:none;}.placesmanager{width:95%;overflow:auto;}.filemanager{width:95%;height:200px;overflow:auto;background-color:#fff;}.filemanager div.file{min-width:80px;height:100px;position:relative;float:left;border:1px outset #666;margin:4px;}.placesmanager div.file{min-width:60px;height:70px;position:relative;float:left;border:1px outset #666;margin:4px;}.filemanager div.file:hover,.placesmanager div.file:hover{border:1px solid #333;background:#fffff3;}.filemanager div.selected,.filemanager div.selected:hover,.placesmanager div.selected,.placesmanager div.selected:hover{background:#ffffda;border:1px solid #000;}.filemanager .filename{margin:.5em;color:#222;}.filemanager div.selected .filename{color:#000;}.filemanager img.thumb{width:50px;height:50px;position:absolute;top:50%;left:50%;margin:-25px 0 0 -25px;border:1px solid black;}.filemanager img.icon{width:32px;height:32px;position:absolute;top:50%;left:50%;margin:-16px 0 0 -16px;}.filemanager img.action{width:15px;height:15px;position:absolute;}.filemanager img.delete{bottom:3px;left:20px;}.filemanager img.copy{bottom:3px;left:3px;} \ No newline at end of file Index: openacs-4/packages/acs-templating/www/resources/xinha-nightly/XinhaConfig.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/www/resources/xinha-nightly/XinhaConfig.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/acs-templating/www/resources/xinha-nightly/XinhaConfig.js 16 Jan 2009 08:36:13 -0000 1.1 @@ -0,0 +1,5992 @@ + + /*--------------------------------------: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/XinhaConfig.js $ + -- $LastChangedDate: 2007-04-12 09:23:45 +1200 (Thu, 12 Apr 2007) $ + -- $LastChangedRevision: 811 $ + -- $LastChangedBy: ray $ + --------------------------------------------------------------------------*/ + +Xinha.version = +{ + 'Release' : 'Trunk', + 'Head' : '$HeadURL: http://svn.xinha.python-hosting.com/trunk/XinhaConfig.js $'.replace(/^[^:]*: (.*) \$$/, '$1'), + 'Date' : '$LastChangedDate: 2007-04-12 09:23:45 +1200 (Thu, 12 Apr 2007) $'.replace(/^[^:]*: ([0-9-]*) ([0-9:]*) ([+0-9]*) \((.*)\) \$/, '$4 $2 $3'), + 'Revision' : '$LastChangedRevision: 811 $'.replace(/^[^:]*: (.*) \$$/, '$1'), + 'RevisionBy': '$LastChangedBy: ray $'.replace(/^[^:]*: (.*) \$$/, '$1') +}; + +//must be here. it is called while converting _editor_url to absolute +Xinha._resolveRelativeUrl = function( base, url ) +{ + if(url.match(/^([^:]+\:)?\//)) + { + return url; + } + else + { + var b = base.split("/"); + if(b[b.length - 1] == "") + { + b.pop(); + } + var p = url.split("/"); + if(p[0] == ".") + { + p.shift(); + } + while(p[0] == "..") + { + b.pop(); + p.shift(); + } + return b.join("/") + "/" + p.join("/"); + } +} + +if ( typeof _editor_url == "string" ) +{ + // Leave exactly one backslash at the end of _editor_url + _editor_url = _editor_url.replace(/\x2f*$/, '/'); + + // convert _editor_url to absolute + 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 = ''; +} + +// make sure we have a language +if ( typeof _editor_lang == "string" ) +{ + _editor_lang = _editor_lang.toLowerCase(); +} +else +{ + _editor_lang = "en"; +} + +// skin stylesheet to load +if ( typeof _editor_skin !== "string" ) +{ + _editor_skin = ""; +} + +var __xinhas = []; + +// browser identification +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_khtml = (Xinha.agt.indexOf("khtml") != -1); +Xinha.is_safari = (Xinha.agt.indexOf("safari") != -1); +Xinha.opera_version = navigator.appVersion.substring(0, navigator.appVersion.indexOf(" "))*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.is_safari); // Safari lies! +Xinha.isRunLocally = document.URL.toLowerCase().search(/^file:/) != -1; +Xinha.is_designMode = (typeof document.designMode != 'undefined' && !Xinha.is_ie); // IE has designMode, but we're not using it +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."); + } + } + if ( Xinha.is_opera ) + { + alert("Sorry, Opera is not yet supported by Xinha."); + } + return Xinha.is_gecko || (Xinha.is_opera && Xinha.opera_version >= 9.1) || Xinha.ie_version >= 5.5; +}; + +Xinha.isSupportedBrowser = Xinha.checkSupportedBrowser(); + +if ( Xinha.isRunLocally && Xinha.isSupportedBrowser) +{ + 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.'); +} + +// Creates a new Xinha object. Tries to replace the textarea with the given +// ID with it. +function Xinha(textarea, config) +{ + if ( !Xinha.isSupportedBrowser ) return; + + if ( !textarea ) + { + throw("Tried to create Xinha without textarea specified."); + } + + if ( typeof config == "undefined" ) + { + this.config = new Xinha.Config(); + } + else + { + this.config = config; + } + this._htmlArea = null; + + if ( typeof textarea != 'object' ) + { + textarea = Xinha.getElementById('textarea', textarea); + } + this._textArea = textarea; + this._textArea.spellcheck = false; + + // Before we modify anything, get the initial textarea size + this._initial_ta_size = + { + w: textarea.style.width ? textarea.style.width : ( textarea.offsetWidth ? ( textarea.offsetWidth + 'px' ) : ( textarea.cols + 'em') ), + h: textarea.style.height ? textarea.style.height : ( textarea.offsetHeight ? ( textarea.offsetHeight + 'px' ) : ( textarea.rows + 'em') ) + }; + + if ( document.getElementById("loading_" + textarea.id) || this.config.showLoading ) + { + if (!document.getElementById("loading_" + textarea.id)) + { + Xinha.createLoadingMessage(textarea); + } + this.setLoadingMessage(Xinha._lc("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-z\d\-\.]{3,}@[_a-z\d\-]{2,}(\.[_a-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 = (typeof document.characterSet != 'undefined') ? document.characterSet : document.charset; + + // Whether the edited document should be rendered in Quirksmode or Standard Compliant (Strict) Mode + // This is commonly known as the "doctype switch" + // for details read here http://www.quirksmode.org/css/quirksmode.html + // + // Possible values: + // true : Quirksmode is used + // false : Strict mode is used + // leave empty : the mode of the document Xinha is in is used + this.browserQuirksMode = ''; + + // 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 "); -var _1bd=_1bb.document.getElementById("__ie_onload"); -_1bd.onreadystatechange=function(){ -if(this.readyState=="loaded"){ -this.parentNode.removeChild(_1bd); -init(); -} -}; -}else{ -if(/applewebkit|KHTML/i.test(navigator.userAgent)){ -Xinha.onloadTimer=_1bb.setInterval(function(){ -if(/loaded|complete/.test(_1bb.document.readyState)){ -init(); -} -},10); -}else{ -_1bb.document.addEventListener("DOMContentLoaded",init,false); -} -} -Xinha._addEvent(_1bb,"load",init); -}; -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(_1c6){ -var a=el._xinha_dom0Events[ev]; -var _1c8=true; -for(var i=a.length;--i>=0;){ -el._xinha_tempEventHandler=a[i]; -if(el._xinha_tempEventHandler(_1c6)===false){ -el._xinha_tempEventHandler=null; -_1c8=false; -break; -} -el._xinha_tempEventHandler=null; -} -return _1c8; -}; -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;i/ig,">"); -str=str.replace(/\xA0/g," "); -str=str.replace(/\x22/g,"""); -return str; -}; -Xinha.prototype.stripBaseURL=function(_1d3){ -if(this.config.baseHref===null||!this.config.stripBaseHref){ -return _1d3; -} -var _1d4=this.config.baseHref.replace(/^(https?:\/\/[^\/]+)(.*)$/,"$1"); -var _1d5=new RegExp(_1d4); -return _1d3.replace(_1d5,""); -}; -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,_1df,init){ -Dialog(this.popupURL(url),_1df,init); -}; -Xinha.prototype.imgURL=function(file,_1e2){ -if(typeof _1e2=="undefined"){ -return _editor_url+file; -}else{ -return _editor_url+"plugins/"+_1e2+"/img/"+file; -} -}; -Xinha.prototype.popupURL=function(file){ -var url=""; -if(file.match(/^plugin:\/\/(.*?)\/(.*)/)){ -var _1e5=RegExp.$1; -var _1e6=RegExp.$2; -if(!(/\.(html?|php)$/.test(_1e6))){ -_1e6+=".html"; -} -url=Xinha.getPluginDir(_1e5)+"/popups/"+_1e6; -}else{ -if(file.match(/^\/.*?/)||file.match(/^https?:\/\//)){ -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 _1ea=this._doc.getElementsByTagName("TABLE"); -if(_1ea.length!==0){ -if(!this.borders){ -this.borders=true; -}else{ -this.borders=false; -} -for(var i=0;i<_1ea.length;i++){ -if(this.borders){ -Xinha._addClass(_1ea[i],"htmtableborders"); -}else{ -Xinha._removeClass(_1ea[i],"htmtableborders"); -} -} -} -return true; -}; -Xinha.addCoreCSS=function(html){ -var _1ed="\n"; -if(html&&//i.test(html)){ -return html.replace(//i,""+_1ed); -}else{ -if(html){ -return _1ed+html; -}else{ -return _1ed; -} -} -}; -Xinha.prototype.addEditorStylesheet=function(_1ee){ -var _1ef=this._doc.createElement("link"); -_1ef.rel="stylesheet"; -_1ef.type="text/css"; -_1ef.title="XinhaInternalCSS"; -_1ef.href=_1ee; -this._doc.getElementsByTagName("HEAD")[0].appendChild(_1ef); -}; -Xinha.stripCoreCSS=function(html){ -return html.replace(/]+title="XinhaInternalCSS"(.|\n)*?<\/style>/ig,"").replace(/]+title="XinhaInternalCSS"(.|\n)*?>/ig,""); -}; -Xinha._removeClass=function(el,_1f2){ -if(!(el&&el.className)){ -return; -} -var cls=el.className.split(" "); -var ar=[]; -for(var i=cls.length;i>0;){ -if(cls[--i]!=_1f2){ -ar[ar.length]=cls[i]; -} -} -el.className=ar.join(" "); -}; -Xinha._addClass=function(el,_1f7){ -Xinha._removeClass(el,_1f7); -el.className+=" "+_1f7; -}; -Xinha.addClasses=function(el,_1f9){ -if(el!==null){ -var _1fa=el.className.trim().split(" "); -var ours=_1f9.split(" "); -for(var x=0;x0;){ -if(cls[--i]==_208){ -return true; -} -} -return false; -}; -Xinha._postback_send_charset=true; -Xinha._postback=function(url,data,_20d){ -var req=null; -req=Xinha.getXMLHTTPRequestObject(); -var _20f=""; -if(typeof data=="string"){ -_20f=data; -}else{ -if(typeof data=="object"){ -for(var i in data){ -_20f+=(_20f.length?"&":"")+i+"="+encodeURIComponent(data[i]); -} -} -} -function callBack(){ -if(req.readyState==4){ -if(req.status==200||Xinha.isRunLocally&&req.status==0){ -if(typeof _20d=="function"){ -_20d(req.responseText,req); -} -}else{ -if(Xinha._postback_send_charset){ -Xinha._postback_send_charset=false; -Xinha._postback(url,data,_20d); -}else{ -alert("An error has occurred: "+req.statusText+"\nURL: "+url); -} -} -} -} -req.onreadystatechange=callBack; -req.open("POST",url,true); -req.setRequestHeader("Content-Type","application/x-www-form-urlencoded"+(Xinha._postback_send_charset?"; charset=UTF-8":"")); -req.send(_20f); -}; -Xinha._getback=function(url,_212){ -var req=null; -req=Xinha.getXMLHTTPRequestObject(); -function callBack(){ -if(req.readyState==4){ -if(req.status==200||Xinha.isRunLocally&&req.status==0){ -_212(req.responseText,req); -}else{ -alert("An error has occurred: "+req.statusText+"\nURL: "+url); -} -} -} -req.onreadystatechange=callBack; -req.open("GET",url,true); -req.send(null); -}; -Xinha._geturlcontent=function(url){ -var req=null; -req=Xinha.getXMLHTTPRequestObject(); -req.open("GET",url,false); -req.send(null); -if(req.status==200||Xinha.isRunLocally&&req.status==0){ -return req.responseText; -}else{ -return ""; -} -}; -if(typeof dumpValues=="undefined"){ -function dumpValues(o){ -var s=""; -for(var prop in o){ -if(window.console&&typeof window.console.log=="function"){ -if(typeof console.firebug!="undefined"){ -console.log(o); -}else{ -console.log(prop+" = "+o[prop]+"\n"); -} -}else{ -s+=prop+" = "+o[prop]+"\n"; -} -} -if(s){ -if(document.getElementById("errors")){ -document.getElementById("errors").value+=s; -}else{ -var x=window.open("","debugger"); -x.document.write("
"+s+"
"); -} -} -} -} -if(!Array.prototype.contains){ -Array.prototype.contains=function(_21a){ -var _21b=this; -for(var i=0;i<_21b.length;i++){ -if(_21a==_21b[i]){ -return true; -} -} -return false; -}; -} -if(!Array.prototype.indexOf){ -Array.prototype.indexOf=function(_21d){ -var _21e=this; -for(var i=0;i<_21e.length;i++){ -if(_21d==_21e[i]){ -return i; -} -} -return null; -}; -} -if(!Array.prototype.append){ -Array.prototype.append=function(a){ -for(var i=0;i>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; -} -} -_252=_252+_251.charAt(enc1)+_251.charAt(enc2)+_251.charAt(enc3)+_251.charAt(enc4); -}while(i<_250.length); -return _252; -}; -Xinha.base64_decode=function(_256){ -var _257="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="; -var _258=""; -var chr1,chr2,chr3; -var enc1,enc2,enc3,enc4; -var i=0; -_256=_256.replace(/[^A-Za-z0-9\+\/\=]/g,""); -do{ -enc1=_257.indexOf(_256.charAt(i++)); -enc2=_257.indexOf(_256.charAt(i++)); -enc3=_257.indexOf(_256.charAt(i++)); -enc4=_257.indexOf(_256.charAt(i++)); -chr1=(enc1<<2)|(enc2>>4); -chr2=((enc2&15)<<4)|(enc3>>2); -chr3=((enc3&3)<<6)|enc4; -_258=_258+String.fromCharCode(chr1); -if(enc3!=64){ -_258=_258+String.fromCharCode(chr2); -} -if(enc4!=64){ -_258=_258+String.fromCharCode(chr3); -} -}while(i<_256.length); -return _258; -}; -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(_25f){ -_25f=(_25f)?_25f:window; -var x,y; -if(_25f.innerHeight){ -x=_25f.innerWidth; -y=_25f.innerHeight; -}else{ -if(_25f.document.documentElement&&_25f.document.documentElement.clientHeight){ -x=_25f.document.documentElement.clientWidth; -y=_25f.document.documentElement.clientHeight; -}else{ -if(_25f.document.body){ -x=_25f.document.body.clientWidth; -y=_25f.document.body.clientHeight; -} -} -} -return {"x":x,"y":y}; -}; -Xinha.pageSize=function(_261){ -_261=(_261)?_261:window; -var x,y; -var _263=_261.document.body.scrollHeight; -var _264=_261.document.documentElement.scrollHeight; -if(_263>_264){ -x=_261.document.body.scrollWidth; -y=_261.document.body.scrollHeight; -}else{ -x=_261.document.documentElement.scrollWidth; -y=_261.document.documentElement.scrollHeight; -} -return {"x":x,"y":y}; -}; -Xinha.prototype.scrollPos=function(_265){ -_265=(_265)?_265:window; -var x,y; -if(_265.pageYOffset){ -x=_265.pageXOffset; -y=_265.pageYOffset; -}else{ -if(_265.document.documentElement&&document.documentElement.scrollTop){ -x=_265.document.documentElement.scrollLeft; -y=_265.document.documentElement.scrollTop; -}else{ -if(_265.document.body){ -x=_265.document.body.scrollLeft; -y=_265.document.body.scrollTop; -} -} -} -return {"x":x,"y":y}; -}; -Xinha.getElementTopLeft=function(_267){ -var _268=curtop=0; -if(_267.offsetParent){ -_268=_267.offsetLeft; -curtop=_267.offsetTop; -while(_267=_267.offsetParent){ -_268+=_267.offsetLeft; -curtop+=_267.offsetTop; -} -} -return {top:curtop,left:_268}; -}; -Xinha.findPosX=function(obj){ -var _26a=0; -if(obj.offsetParent){ -return Xinha.getElementTopLeft(obj).left; -}else{ -if(obj.x){ -_26a+=obj.x; -} -} -return _26a; -}; -Xinha.findPosY=function(obj){ -var _26c=0; -if(obj.offsetParent){ -return Xinha.getElementTopLeft(obj).top; -}else{ -if(obj.y){ -_26c+=obj.y; -} -} -return _26c; -}; -Xinha.createLoadingMessages=function(_26d){ -if(Xinha.loadingMessages||!Xinha.isSupportedBrowser){ -return; -} -Xinha.loadingMessages=[]; -for(var i=0;i<_26d.length;i++){ -if(!document.getElementById(_26d[i])){ -continue; -} -Xinha.loadingMessages.push(Xinha.createLoadingMessage(Xinha.getElementById("textarea",_26d[i]))); -} -}; -Xinha.createLoadingMessage=function(_26f,text){ -if(document.getElementById("loading_"+_26f.id)||!Xinha.isSupportedBrowser){ -return; -} -var _271=document.createElement("div"); -_271.id="loading_"+_26f.id; -_271.className="loading"; -_271.style.left=(Xinha.findPosX(_26f)+_26f.offsetWidth/2)-106+"px"; -_271.style.top=(Xinha.findPosY(_26f)+_26f.offsetHeight/2)-50+"px"; -var _272=document.createElement("div"); -_272.className="loading_main"; -_272.id="loading_main_"+_26f.id; -_272.appendChild(document.createTextNode(Xinha._lc("Loading in progress. Please wait!"))); -var _273=document.createElement("div"); -_273.className="loading_sub"; -_273.id="loading_sub_"+_26f.id; -text=text?text:Xinha._lc("Loading Core"); -_273.appendChild(document.createTextNode(text)); -_271.appendChild(_272); -_271.appendChild(_273); -document.body.appendChild(_271); -Xinha.freeLater(_271); -Xinha.freeLater(_272); -Xinha.freeLater(_273); -return _273; -}; -Xinha.prototype.setLoadingMessage=function(_274,_275){ -if(!document.getElementById("loading_sub_"+this._textArea.id)){ -return; -} -document.getElementById("loading_main_"+this._textArea.id).innerHTML=_275?_275:Xinha._lc("Loading in progress. Please wait!"); -document.getElementById("loading_sub_"+this._textArea.id).innerHTML=_274; -}; -Xinha.setLoadingMessage=function(_276){ -if(!Xinha.loadingMessages){ -return; -} -for(var i=0;i=2007121016;Xinha.is_ff2=Xinha.is_real_gecko&&parseInt(navigator.productSub,10)<2007121016;Xinha.isRunLocally=document.URL.toLowerCase().search(/^file:/)!=-1;Xinha.is_designMode=(typeof document.designMode!="undefined"&&!Xinha.is_ie);Xinha.checkSupportedBrowser=function(){return Xinha.is_real_gecko||(Xinha.is_opera&&Xinha.opera_version>=9.2)||Xinha.ie_version>=5.5||Xinha.webkit_version>=522};Xinha.isSupportedBrowser=Xinha.checkSupportedBrowser();if(Xinha.isRunLocally&&Xinha.isSupportedBrowser){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(a,c){if(!Xinha.isSupportedBrowser){return}if(!a){throw new Error("Tried to create Xinha without textarea specified.")}if(typeof c=="undefined"){this.config=new Xinha.Config()}else{this.config=c}if(typeof a!="object"){a=Xinha.getElementById("textarea",a)}this._textArea=a;this._textArea.spellcheck=false;Xinha.freeLater(this,"_textArea");this._initial_ta_size={w:a.style.width?a.style.width:(a.offsetWidth?(a.offsetWidth+"px"):(a.cols+"em")),h:a.style.height?a.style.height:(a.offsetHeight?(a.offsetHeight+"px"):(a.rows+"em"))};if(document.getElementById("loading_"+a.id)||this.config.showLoading){if(!document.getElementById("loading_"+a.id)){Xinha.createLoadingMessage(a)}this.setLoadingMessage(Xinha._lc("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 b={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 d in b){if(!b[d].container){continue}b[d].div=b[d].container;b[d].container.className="panels panels_"+d;Xinha.freeLater(b[d],"container");Xinha.freeLater(b[d],"div")}this._panels=b;this._statusBar=null;this._statusBarTree=null;this._statusBarTextMode=null;this._statusBarItems=[];this._framework={};this._htmlArea=null;this._iframe=null;this._doc=null;this._toolBar=this._toolbar=null;this._toolbarObjects={};this.plugins.Events={name:"Events",developer:"The Xinha Core Developer Team",instance:c.Events}}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.escapeStringForRegExp=function(a){return a.replace(Xinha.RE_Specials,"\\$1")};Xinha.RE_email=/^[_a-z\d\-\.]{3,}@[_a-z\d\-]{2,}(\.[_a-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(){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.iframeWidth=null;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.inwardHtml=function(c){return c};this.outwardHtml=function(c){return c};this.autofocus=false;this.killWordOnPaste=true;this.makeLinkShowsTarget=true;this.charSet=(typeof document.characterSet!="undefined")?document.characterSet:document.charset;this.browserQuirksMode=null;this.imgURL="images/";this.popupURL="popups/";this.htmlRemoveTags=null;this.flowToolbars=true;this.toolbarAlign="left";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.dialogOptions={centered:true,greyout:true,closeOnEscape:true};this.Events={};this.customSelects={};this.debug=false;this.URIs={blank:_editor_url+"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:_editor_url+"popups/select_color.html",help:_editor_url+"popups/editor_help.html"};this.btnList={bold:["Bold",Xinha._lc({key:"button_bold",string:["ed_buttons_main.png",3,2]},"Xinha"),false,function(c){c.execCommand("bold")}],italic:["Italic",Xinha._lc({key:"button_italic",string:["ed_buttons_main.png",2,2]},"Xinha"),false,function(c){c.execCommand("italic")}],underline:["Underline",Xinha._lc({key:"button_underline",string:["ed_buttons_main.png",2,0]},"Xinha"),false,function(c){c.execCommand("underline")}],strikethrough:["Strikethrough",Xinha._lc({key:"button_strikethrough",string:["ed_buttons_main.png",3,0]},"Xinha"),false,function(c){c.execCommand("strikethrough")}],subscript:["Subscript",Xinha._lc({key:"button_subscript",string:["ed_buttons_main.png",3,1]},"Xinha"),false,function(c){c.execCommand("subscript")}],superscript:["Superscript",Xinha._lc({key:"button_superscript",string:["ed_buttons_main.png",2,1]},"Xinha"),false,function(c){c.execCommand("superscript")}],justifyleft:["Justify Left",["ed_buttons_main.png",0,0],false,function(c){c.execCommand("justifyleft")}],justifycenter:["Justify Center",["ed_buttons_main.png",1,1],false,function(c){c.execCommand("justifycenter")}],justifyright:["Justify Right",["ed_buttons_main.png",1,0],false,function(c){c.execCommand("justifyright")}],justifyfull:["Justify Full",["ed_buttons_main.png",0,1],false,function(c){c.execCommand("justifyfull")}],orderedlist:["Ordered List",["ed_buttons_main.png",0,3],false,function(c){c.execCommand("insertorderedlist")}],unorderedlist:["Bulleted List",["ed_buttons_main.png",1,3],false,function(c){c.execCommand("insertunorderedlist")}],insertorderedlist:["Ordered List",["ed_buttons_main.png",0,3],false,function(c){c.execCommand("insertorderedlist")}],insertunorderedlist:["Bulleted List",["ed_buttons_main.png",1,3],false,function(c){c.execCommand("insertunorderedlist")}],outdent:["Decrease Indent",["ed_buttons_main.png",1,2],false,function(c){c.execCommand("outdent")}],indent:["Increase Indent",["ed_buttons_main.png",0,2],false,function(c){c.execCommand("indent")}],forecolor:["Font Color",["ed_buttons_main.png",3,3],false,function(c){c.execCommand("forecolor")}],hilitecolor:["Background Color",["ed_buttons_main.png",2,3],false,function(c){c.execCommand("hilitecolor")}],undo:["Undoes your last action",["ed_buttons_main.png",4,2],false,function(c){c.execCommand("undo")}],redo:["Redoes your last action",["ed_buttons_main.png",5,2],false,function(c){c.execCommand("redo")}],cut:["Cut selection",["ed_buttons_main.png",5,0],false,function(d,c){d.execCommand(c)}],copy:["Copy selection",["ed_buttons_main.png",4,0],false,function(d,c){d.execCommand(c)}],paste:["Paste from clipboard",["ed_buttons_main.png",4,1],false,function(d,c){d.execCommand(c)}],selectall:["Select all",["ed_buttons_main.png",3,5],false,function(c){c.execCommand("selectall")}],inserthorizontalrule:["Horizontal Rule",["ed_buttons_main.png",6,0],false,function(c){c.execCommand("inserthorizontalrule")}],createlink:["Insert Web Link",["ed_buttons_main.png",6,1],false,function(c){c._createLink()}],insertimage:["Insert/Modify Image",["ed_buttons_main.png",6,3],false,function(c){c.execCommand("insertimage")}],inserttable:["Insert Table",["ed_buttons_main.png",6,2],false,function(c){c.execCommand("inserttable")}],htmlmode:["Toggle HTML Source",["ed_buttons_main.png",7,0],true,function(c){c.execCommand("htmlmode")}],toggleborders:["Toggle Borders",["ed_buttons_main.png",7,2],false,function(c){c._toggleBorders()}],print:["Print document",["ed_buttons_main.png",8,1],false,function(c){if(Xinha.is_gecko){c._iframe.contentWindow.print()}else{c.focusEditor();print()}}],saveas:["Save as","ed_saveas.png",false,function(c){c.execCommand("saveas",false,"noname.htm")}],about:["About this editor",["ed_buttons_main.png",8,2],true,function(c){c.getPluginInstance("AboutBox").show()}],showhelp:["Help using editor",["ed_buttons_main.png",9,2],true,function(c){c.execCommand("showhelp")}],splitblock:["Split Block","ed_splitblock.gif",false,function(c){c._splitBlock()}],lefttoright:["Direction left to right",["ed_buttons_main.png",0,2],false,function(c){c.execCommand("lefttoright")}],righttoleft:["Direction right to left",["ed_buttons_main.png",1,2],false,function(c){c.execCommand("righttoleft")}],overwrite:["Insert/Overwrite","ed_overwrite.gif",false,function(c){c.execCommand("overwrite")}],wordclean:["MS Word Cleaner",["ed_buttons_main.png",5,3],false,function(c){c._wordClean()}],clearfonts:["Clear Inline Font Specifications",["ed_buttons_main.png",5,4],true,function(c){c._clearFonts()}],removeformat:["Remove formatting",["ed_buttons_main.png",4,4],false,function(c){c.execCommand("removeformat")}],killword:["Clear MSOffice tags",["ed_buttons_main.png",4,3],false,function(c){c.execCommand("killword")}]};this.iconList={dialogCaption:_editor_url+"images/xinha-small-icon.gif",wysiwygmode:[_editor_url+"images/ed_buttons_main.png",7,1]};for(var b in this.btnList){var a=this.btnList[b];if(typeof a!="object"){continue}if(typeof a[1]!="string"){a[1][0]=_editor_url+this.imgURL+a[1][0]}else{a[1]=_editor_url+this.imgURL+a[1]}a[0]=Xinha._lc(a[0])}};Xinha.Config.prototype.registerIcon=function(b,a){this.iconList[b]=a};Xinha.Config.prototype.registerButton=function(f,d,e,a,c,b){if(typeof f=="string"){this.btnList[f]=[d,e,a,c,b]}else{if(typeof f=="object"){this.btnList[f.id]=[f.tooltip,f.image,f.textMode,f.action,f.context]}else{alert("ERROR [Xinha.Config::registerButton]:\ninvalid arguments");return false}}};Xinha.prototype.registerPanel=function(c,b){if(!c){c="right"}this.setLoadingMessage("Register "+c+" panel ");var a=this.addPanel(c);if(b){b.drawPanelIn(a)}};Xinha.Config.prototype.registerDropdown=function(a){this.customSelects[a.id]=a};Xinha.Config.prototype.hideSomeButtons=function(b){var f=this.toolbar;for(var e=f.length;--e>=0;){var c=f[e];for(var d=c.length;--d>=0;){if(b.indexOf(" "+c[d]+" ")>=0){var a=1;if(/separator|space/.test(c[d+1])){a=2}c.splice(d,a)}}}};Xinha.Config.prototype.addToolbarElement=function(d,h,k){var p=this.toolbar;var q,g,f,e,c;var n=false;var b=false;var t=0;var l=0;var m=0;var r=false;var s=false;if((d&&typeof d=="object")&&(d.constructor==Array)){n=true}if((h&&typeof h=="object")&&(h.constructor==Array)){b=true;t=h.length}if(n){for(g=0;g=0;){q.splice(f,0,d[g])}}else{q[f]=d}}else{if(k<0){f=f+k+1}else{if(k>0){f=f+k}}if(n){for(g=d.length;--g>=0;){q.splice(f,0,d[g])}}else{q.splice(f,0,d)}}}else{p[0].splice(0,0,"separator");if(n){for(g=d.length;--g>=0;){p[0].splice(0,0,d[g])}}else{p[0].splice(0,0,d)}}};Xinha.Config.prototype.removeToolbarElement=Xinha.Config.prototype.hideSomeButtons;Xinha.replaceAll=function(a){var c=document.getElementsByTagName("textarea");for(var b=c.length;b>0;new Xinha(c[--b],a).generate()){}};Xinha.replace=function(c,b){var a=Xinha.getElementById("textarea",c);return a?new Xinha(a,b).generate():null};Xinha.prototype._createToolbar=function(){this.setLoadingMessage(Xinha._lc("Create Toolbar"));var b=this;var c=document.createElement("div");this._toolBar=this._toolbar=c;c.className="toolbar";c.unselectable="1";c.align=this.config.toolbarAlign;Xinha.freeLater(this,"_toolBar");Xinha.freeLater(this,"_toolbar");var a=null;var d={};this._toolbarObjects=d;this._createToolbar1(b,c,d);this._htmlArea.appendChild(c);return c};Xinha.prototype._setConfig=function(a){this.config=a};Xinha.prototype._rebuildToolbar=function(){this._createToolbar1(this,this._toolbar,this._toolbarObjects);if(Xinha._currentlyActiveEditor){if(Xinha._currentlyActiveEditor==this){this.activateEditor()}}else{this.disableToolbar()}};Xinha._createToolbarBreakingElement=function(){var a=document.createElement("div");a.style.height="1px";a.style.width="1px";a.style.lineHeight="1px";a.style.fontSize="1px";a.style.clear="both";return a};Xinha.prototype._createToolbar1=function(m,p,s){while(p.lastChild){p.removeChild(p.lastChild)}var d;if(m.config.flowToolbars){p.appendChild(Xinha._createToolbarBreakingElement())}function l(){if(typeof d!="undefined"&&d.childNodes.length===0){return}var i=document.createElement("table");i.border="0px";i.cellSpacing="0px";i.cellPadding="0px";if(m.config.flowToolbars){if(Xinha.is_ie){i.style.styleFloat="left"}else{i.style.cssFloat="left"}}p.appendChild(i);var j=document.createElement("tbody");i.appendChild(j);d=document.createElement("tr");j.appendChild(d);i.className="toolbarRow"}l();function c(u,t){var j=this[u];var i=this.element;if(j!=t){switch(u){case"enabled":if(t){Xinha._removeClass(i,"buttonDisabled");i.disabled=false}else{Xinha._addClass(i,"buttonDisabled");i.disabled=true}break;case"active":if(t){Xinha._addClass(i,"buttonPressed")}else{Xinha._removeClass(i,"buttonPressed")}break}this[u]=t}}function b(x){var C=null;var t=null;var u=null;var z=m.config.customSelects;var j=null;var B="";switch(x){case"fontsize":case"fontname":case"formatblock":C=m.config[x];u=x;break;default:u=x;var A=z[u];if(typeof A!="undefined"){C=A.options;j=A.context;if(typeof A.tooltip!="undefined"){B=A.tooltip}}else{alert("ERROR [createSelect]:\nCan't find the requested dropdown definition")}break}if(C){t=document.createElement("select");t.title=B;t.style.width="auto";t.name=x;var w={name:x,element:t,enabled:true,text:false,cmd:u,state:c,context:j};Xinha.freeLater(w);s[x]=w;for(var v in C){if(typeof C[v]!="string"){continue}var y=document.createElement("option");y.innerHTML=Xinha._lc(v);y.value=C[v];t.appendChild(y)}Xinha._addEvent(t,"change",function(){m._comboSelected(t,x)})}return t}function q(i){var u,t,v=null;switch(i){case"separator":if(m.config.flowToolbars){l()}u=document.createElement("div");u.className="separator";break;case"space":u=document.createElement("div");u.className="space";break;case"linebreak":l();return false;case"textindicator":u=document.createElement("div");u.appendChild(document.createTextNode("A"));u.className="indicator";u.title=Xinha._lc("Current style");v={name:i,element:u,enabled:true,active:false,text:false,cmd:"textindicator",state:c};Xinha.freeLater(v);s[i]=v;break;default:t=m.config.btnList[i]}if(!u&&t){u=document.createElement("a");u.style.display="block";u.href="javascript:void(0)";u.style.textDecoration="none";u.title=t[0];u.className="button";u.style.direction="ltr";v={name:i,element:u,enabled:true,active:false,text:t[2],cmd:t[3],state:c,context:t[4]||null};Xinha.freeLater(u);Xinha.freeLater(v);s[i]=v;u.ondrag=function(){return false};Xinha._addEvent(u,"mouseout",function(x){if(v.enabled){Xinha._removeClass(u,"buttonActive");if(v.active){Xinha._addClass(u,"buttonPressed")}}});Xinha._addEvent(u,"mousedown",function(x){if(v.enabled){Xinha._addClass(u,"buttonActive");Xinha._removeClass(u,"buttonPressed");Xinha._stopEvent(Xinha.is_ie?window.event:x)}});Xinha._addEvent(u,"click",function(x){x=x||window.event;m.btnClickEvent={clientX:x.clientX,clientY:x.clientY};if(v.enabled){Xinha._removeClass(u,"buttonActive");if(Xinha.is_gecko){m.activateEditor()}v.cmd(m,v.name,v,x);Xinha._stopEvent(x)}});var w=Xinha.makeBtnImg(t[1]);var j=w.firstChild;Xinha.freeLater(w);Xinha.freeLater(j);u.appendChild(w);v.imgel=j;v.swapImage=function(x){if(typeof x!="string"){j.src=x[0];j.style.position="relative";j.style.top=x[2]?("-"+(18*(x[2]+1))+"px"):"-18px";j.style.left=x[1]?("-"+(18*(x[1]+1))+"px"):"-18px"}else{v.imgel.src=x;j.style.top="0px";j.style.left="0px"}}}else{if(!u){u=b(i)}}return u}var k=true;for(var h=0;h] button to switch back to WYSIWYG.");c.style.display="none";this._statusBarTextMode=c;Xinha.freeLater(this,"_statusBarTextMode");b.appendChild(c);b.style.whiteSpace="nowrap";var a=this;this.notifyOn("before_resize",function(f,g){a._statusBar.style.width=null});this.notifyOn("resize",function(f,g){if(Xinha.is_ie&&Xinha.ie_version==6){a._statusBar.style.width="100%"}else{var h=g.width;a._statusBar.style.width=h+"px"}});this.notifyOn("modechange",function(f,l){for(var h in a._statusWidgets){var k=a._statusWidgets[h];for(var g=0;g=0;){for(var v=o[w].length;--v>=0;){switch(o[w][v]){case"popupeditor":if(!this.plugins.FullScreen){d.registerPlugin("FullScreen")}break;case"insertimage":e=_editor_url+"modules/InsertImage/insert_image.js";if(typeof Xinha.prototype._insertImage=="undefined"&&!Xinha.loadPlugins([{plugin:"InsertImage",url:e}],f)){return false}else{if(typeof Xinha.getPluginConstructor("InsertImage")!="undefined"&&!this.plugins.InsertImage){d.registerPlugin("InsertImage")}}break;case"createlink":e=_editor_url+"modules/CreateLink/link.js";if(typeof Xinha.getPluginConstructor("Linker")=="undefined"&&!Xinha.loadPlugins([{plugin:"CreateLink",url:e}],f)){return false}else{if(typeof Xinha.getPluginConstructor("CreateLink")!="undefined"&&!this.plugins.CreateLink){d.registerPlugin("CreateLink")}}break;case"inserttable":e=_editor_url+"modules/InsertTable/insert_table.js";if(!Xinha.loadPlugins([{plugin:"InsertTable",url:e}],f)){return false}else{if(typeof Xinha.getPluginConstructor("InsertTable")!="undefined"&&!this.plugins.InsertTable){d.registerPlugin("InsertTable")}}break;case"about":e=_editor_url+"modules/AboutBox/AboutBox.js";if(!Xinha.loadPlugins([{plugin:"AboutBox",url:e}],f)){return false}else{if(typeof Xinha.getPluginConstructor("AboutBox")!="undefined"&&!this.plugins.AboutBox){d.registerPlugin("AboutBox")}}break}}}if(Xinha.is_gecko&&d.config.mozParaHandler!="built-in"){if(!Xinha.loadPlugins([{plugin:"EnterParagraphs",url:_editor_url+"modules/Gecko/paraHandlerBest.js"}],f)){return false}if(!this.plugins.EnterParagraphs){d.registerPlugin("EnterParagraphs")}}var E=this.config.getHtmlMethod=="TransformInnerHTML"?_editor_url+"modules/GetHtml/TransformInnerHTML.js":_editor_url+"modules/GetHtml/DOMwalk.js";if(!Xinha.loadPlugins([{plugin:"GetHtmlImplementation",url:E}],f)){return false}else{if(!this.plugins.GetHtmlImplementation){d.registerPlugin("GetHtmlImplementation")}}function s(i){return i.textContent||i.text}if(_editor_skin){this.skinInfo={};var u=Xinha._geturlcontent(_editor_url+"skins/"+_editor_skin+"/skin.xml",true);if(u){var p=u.getElementsByTagName("meta");for(w=0;w'}else{if(f.config.browserQuirksMode===true){a=""}else{a=Xinha.getDoctype(document)}}if(!f.config.fullPage){d+=a+"\n";d+="\n";d+="\n";d+='\n';if(typeof f.config.baseHref!="undefined"&&f.config.baseHref!==null){d+='\n'}d+=Xinha.addCoreCSS();if(typeof f.config.pageStyleSheets!=="undefined"){for(var c=0;c0){d+=''}}}if(f.config.pageStyle){d+='"}d+="\n";d+="\n";d+=f.inwardHtml(f._textArea.value);d+="\n";d+=""}else{d=f.inwardHtml(f._textArea.value);if(d.match(Xinha.RE_doctype)){f.setDoctype(RegExp.$1)}var b=d.match(//gi);d=d.replace(/\s*/gi,"");if(b){d=d.replace(/<\/head>/i,b.join("\n")+"\n")}}g.write(d);g.close();if(this.config.fullScreen){this._fullScreen()}this.setEditorEvents();if((typeof f.config.autofocus!="undefined")&&((f.config.autofocus==f._textArea.id)||f.config.autofocus==true)){f.activateEditor();f.focusEditor()}};Xinha.prototype.whenDocReady=function(a){var b=this;if(this._doc&&this._doc.body){a()}else{setTimeout(function(){b.whenDocReady(a)},50)}};Xinha.prototype.setMode=function(b){var a;if(typeof b=="undefined"){b=this._editMode=="textmode"?"wysiwyg":"textmode"}switch(b){case"textmode":this.firePluginEvent("onBeforeMode","textmode");this._toolbarObjects.htmlmode.swapImage(this.config.iconList.wysiwygmode);this.setCC("iframe");a=this.outwardHtml(this.getHTML());this.setHTML(a);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.findCC("textarea");this.notifyOf("modechange",{mode:"text"});this.firePluginEvent("onMode","textmode");break;case"wysiwyg":this.firePluginEvent("onBeforeMode","wysiwyg");this._toolbarObjects.htmlmode.swapImage([this.imgURL("images/ed_buttons_main.png"),7,0]);this.setCC("textarea");a=this.inwardHtml(this.getHTML());this.deactivateEditor();this.setHTML(a);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.findCC("iframe");this.notifyOf("modechange",{mode:"wysiwyg"});this.firePluginEvent("onMode","wysiwyg");break;default:alert("Mode <"+b+"> not defined!");return false}this._editMode=b};Xinha.prototype.setFullHTML=function(c){var a=RegExp.multiline;RegExp.multiline=true;if(c.match(Xinha.RE_doctype)){this.setDoctype(RegExp.$1)}RegExp.multiline=a;if(0){if(c.match(Xinha.RE_head)){this._doc.getElementsByTagName("head")[0].innerHTML=RegExp.$1}if(c.match(Xinha.RE_body)){this._doc.getElementsByTagName("body")[0].innerHTML=RegExp.$1}}else{var d=this.editorIsActivated();if(d){this.deactivateEditor()}var b=/((.|\n)*?)<\/html>/i;c=c.replace(b,"$1");this._doc.open("text/html","replace");this._doc.write(c);this._doc.close();if(d){this.activateEditor()}this.setEditorEvents();return true}};Xinha.prototype.setEditorEvents=function(){var a=this;var b=this._doc;a.whenDocReady(function(){Xinha._addEvents(b,["mousedown"],function(){a.activateEditor();return true});if(Xinha.is_ie){Xinha._addEvent(a._doc.getElementsByTagName("html")[0],"click",function(){if(a._iframe.contentWindow.event.srcElement.tagName.toLowerCase()=="html"){var e=a._doc.body.createTextRange();e.collapse();e.select()}return true})}Xinha._addEvents(b,["keydown","keypress","mousedown","mouseup","drag"],function(e){return a._editorEvent(Xinha.is_ie?a._iframe.contentWindow.event:e)});for(var c in a.plugins){var d=a.plugins[c].instance;Xinha.refreshPlugin(d)}if(typeof a._onGenerate=="function"){a._onGenerate()}Xinha.addDom0Event(window,"resize",function(f){a.sizeEditor()});a.removeLoadingMessage()})};Xinha.getPluginConstructor=function(a){return Xinha.plugins[a]||window[a]};Xinha.prototype.registerPlugin=function(){if(!Xinha.isSupportedBrowser){return}var c=arguments[0];if(c===null||typeof c=="undefined"||(typeof c=="string"&&Xinha.getPluginConstructor(c)=="undefined")){return false}var a=[];for(var b=1;b=0;){c.value+=" "}c.value+=e+"\n"}function a(e,h){var d=e.tagName.toLowerCase(),f;var g=Xinha.is_ie?e.scopeName:e.prefix;b(h,"- "+d+" ["+g+"]");for(f=e.firstChild;f;f=f.nextSibling){if(f.nodeType==1){a(f,h+2)}}}a(this._doc.body,0);document.body.appendChild(c)};Xinha.getInnerText=function(c){var a="",b;for(b=c.firstChild;b;b=b.nextSibling){if(b.nodeType==3){a+=b.data}else{if(b.nodeType==1){a+=Xinha.getInnerText(b)}}}return a};Xinha.prototype._wordClean=function(){var e=this;var c={empty_tags:0,cond_comm:0,mso_elmts:0,mso_class:0,mso_style:0,mso_xmlel:0,orig_len:this._doc.body.innerHTML.length,T:new Date().getTime()};var h={empty_tags:"Empty tags removed: ",cond_comm:"Conditional comments removed",mso_elmts:"MSO invalid elements removed",mso_class:"MSO class names removed: ",mso_style:"MSO inline style removed: ",mso_xmlel:"MSO XML elements stripped: "};function a(){var j="Xinha word cleaner stats: \n\n";for(var k in c){if(h[k]){j+=h[k]+c[k]+"\n"}}j+="\nInitial document length: "+c.orig_len+"\n";j+="Final document length: "+e._doc.body.innerHTML.length+"\n";j+="Clean-up took "+((new Date().getTime()-c.T)/1000)+" seconds";alert(j)}function i(j){var k=j.className.replace(/(^|\s)mso.*?(\s|$)/ig," ");if(k!=j.className){j.className=k;if(!/\S/.test(j.className)){j.removeAttribute("className");++c.mso_class}}}function f(k){var l=k.style.cssText.split(/\s*;\s*/);for(var j=l.length;--j>=0;){if(/^mso|^tab-stops/i.test(l[j])||/^margin\s*:\s*0..\s+0..\s+0../i.test(l[j])){++c.mso_style;l.splice(j,1)}}k.style.cssText=l.join("; ")}function d(j){if(("link"==j.tagName.toLowerCase()&&(j.attributes&&/File-List|Edit-Time-Data|themeData|colorSchemeMapping/.test(j.attributes.rel.nodeValue)))||/^(style|meta)$/i.test(j.tagName)){Xinha.removeFromParent(j);++c.mso_elmts;return true}return false}function b(j){if(/^(a|span|b|strong|i|em|font|div|p)$/i.test(j.tagName)&&!j.firstChild){Xinha.removeFromParent(j);++c.empty_tags;return true}return false}function g(j){i(j);f(j);var m;for(var l=j.firstChild;l;l=m){m=l.nextSibling;if(l.nodeType==1&&g(l)){if((Xinha.is_ie&&j.scopeName!="HTML")||(!Xinha.is_ie&&/:/.test(l.tagName))){for(var k=l.childNodes&&l.childNodes.length-1;l.childNodes&&l.childNodes.length&&l.childNodes[k];--k){if(l.nextSibling){l.parentNode.insertBefore(l.childNodes[k],l.nextSibling)}else{l.parentNode.appendChild(l.childNodes[k])}}Xinha.removeFromParent(l);continue}if(b(l)){continue}if(d(l)){continue}}else{if(l.nodeType==8){if(/(\s*\[\s*if\s*(([gl]te?|!)\s*)?(IE|mso)\s*(\d+(\.\d+)?\s*)?\]>)/.test(l.nodeValue)){Xinha.removeFromParent(l);++c.cond_comm}}}}return true}g(this._doc.body);this.updateToolbar()};Xinha.prototype._clearFonts=function(){var a=this.getInnerHTML();if(confirm(Xinha._lc("Would you like to clear font typefaces?"))){a=a.replace(/face="[^"]*"/gi,"");a=a.replace(/font-family:[^;}"']+;?/gi,"")}if(confirm(Xinha._lc("Would you like to clear font sizes?"))){a=a.replace(/size="[^"]*"/gi,"");a=a.replace(/font-size:[^;}"']+;?/gi,"")}if(confirm(Xinha._lc("Would you like to clear font colours?"))){a=a.replace(/color="[^"]*"/gi,"");a=a.replace(/([^\-])color:[^;}"']+;?/gi,"$1")}a=a.replace(/(style|class)="\s*"/gi,"");a=a.replace(/<(font|span)\s*>/gi,"");this.setHTML(a);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(a){}break;case"textmode":try{this._textArea.focus()}catch(b){}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 b=true;var a=this.getInnerHTML();if(this._undoPos>0){b=(this._undoQueue[this._undoPos-1]!=a)}if(b){this._undoQueue[this._undoPos]=a}else{this._undoPos--}};Xinha.prototype.undo=function(){if(this._undoPos>0){var a=this._undoQueue[--this._undoPos];if(a){this.setHTML(a)}else{++this._undoPos}}};Xinha.prototype.redo=function(){if(this._undoPos=0;){var el=ancestors[i];if(!el){continue}var a=document.createElement("a");a.href="javascript:void(0);";a.el=el;a.editor=this;this._statusBarItems.push(a);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();switch(txt){case"b":txt="strong";break;case"i":txt="em";break;case"strike":txt="del";break}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)))}Xinha.freeLater(a)}}}for(var cmd in this._toolbarObjects){var btn=this._toolbarObjects[cmd];var inContext=true;if(typeof btn.state!="function"){continue}if(btn.context&&!text){inContext=false;var context=btn.context;var attrs=[];if(/(.*)\[(.*?)\]/.test(context)){context=RegExp.$1;attrs=RegExp.$2.split(",")}context=context.toLowerCase();var match=(context=="*");for(var k=0;k|>=|<|<=)(.*)/);att=contextSplit[1];comp=contextSplit[2];attVal=contextSplit[3];if(!eval(ancestors[k][att]+comp+attVal)){inContext=false;break}}if(inContext){break}}}}btn.state("enabled",(!text||btn.text)&&inContext);if(typeof cmd=="function"){continue}var dropdown=this.config.customSelects[cmd];if((!text||btn.text)&&(typeof dropdown!="undefined")){dropdown.refresh(this);continue}switch(cmd){case"fontname":case"fontsize":if(!text){try{var value=(""+doc.queryCommandValue(cmd)).toLowerCase();if(!value){btn.element.selectedIndex=0;break}var options=this.config[cmd];var sIndex=0;for(var j in options){if((j.toLowerCase()==value)||(options[j].substr(0,value.length).toLowerCase()==value)){btn.element.selectedIndex=sIndex;throw"ok"}++sIndex}btn.element.selectedIndex=0}catch(ex){}}break;case"formatblock":var blocks=[];for(var indexBlock in this.config.formatblock){if(typeof this.config.formatblock[indexBlock]=="string"){blocks[blocks.length]=this.config.formatblock[indexBlock]}}var deepestAncestor=this._getFirstAncestor(this.getSelection(),blocks);if(deepestAncestor){for(var x=0;x"}this.execCommand(a,false,c);break;default:var d=this.config.customSelects[a];if(typeof d!="undefined"){d.action(this)}else{alert("FIXME: combo box "+a+" not implemented")}break}};Xinha.prototype._colorSelector=function(h){var g=this;if(Xinha.is_gecko){try{g._doc.execCommand("useCSS",false,false);g._doc.execCommand("styleWithCSS",false,true)}catch(e){}}var d=g._toolbarObjects[h].element;var f;if(h=="hilitecolor"){if(Xinha.is_ie){h="backcolor";f=Xinha._colorToRgb(g._doc.queryCommandValue("backcolor"))}else{f=Xinha._colorToRgb(g._doc.queryCommandValue("hilitecolor"))}}else{f=Xinha._colorToRgb(g._doc.queryCommandValue("forecolor"))}var b=function(i){g._doc.execCommand(h,false,i)};if(Xinha.is_ie){var a=g.createRange(g.getSelection());b=function(i){a.select();g._doc.execCommand(h,false,i)}}var c=new Xinha.colorPicker({cellsize:g.config.colorPickerCellSize,callback:b,granularity:g.config.colorPickerGranularity,websafe:g.config.colorPickerWebSafe,savecolors:g.config.colorPickerSaveColors});c.open(g.config.colorPickerPosition,d,f)};Xinha.prototype.execCommand=function(h,f,g){var e=this;this.focusEditor();h=h.toLowerCase();if(this.firePluginEvent("onExecCommand",h,f,g)){this.updateToolbar();return false}switch(h){case"htmlmode":this.setMode();break;case"hilitecolor":case"forecolor":this._colorSelector(h);break;case"createlink":this._createLink();break;case"undo":case"redo":if(this._customUndo){this[h]()}else{this._doc.execCommand(h,f,g)}break;case"inserttable":this._insertTable();break;case"insertimage":this._insertImage();break;case"showhelp":this._popupDialog(e.config.URIs.help,null,this);break;case"killword":this._wordClean();break;case"cut":case"copy":case"paste":this._doc.execCommand(h,f,g);if(this.config.killWordOnPaste){this._wordClean()}break;case"lefttoright":case"righttoleft":if(this.config.changeJustifyWithDirection){this._doc.execCommand((h=="righttoleft")?"justifyright":"justifyleft",f,g)}var a=(h=="righttoleft")?"rtl":"ltr";var d=this.getParentElement();while(d&&!Xinha.isBlockElement(d)){d=d.parentNode}if(d){if(d.style.direction==a){d.style.direction=""}else{d.style.direction=a}}break;case"justifyleft":case"justifyright":h.match(/^justify(.*)$/);var c=this.activeElement(this.getSelection());if(c&&c.tagName.toLowerCase()=="img"){c.align=c.align==RegExp.$1?"":RegExp.$1}else{this._doc.execCommand(h,f,g)}break;default:try{this._doc.execCommand(h,f,g)}catch(b){if(this.config.debug){alert(b+"\n\nby execCommand("+h+");")}}break}this.updateToolbar();return false};Xinha.prototype._editorEvent=function(b){var a=this;if(typeof a._textArea["on"+b.type]=="function"){a._textArea["on"+b.type](b)}if(this.isKeyEvent(b)){if(a.firePluginEvent("onKeyPress",b)){return false}if(this.isShortCut(b)){this._shortCuts(b)}}if(b.type=="mousedown"){if(a.firePluginEvent("onMouseDown",b)){return false}}if(a._timerToolbar){clearTimeout(a._timerToolbar)}if(!this.suspendUpdateToolbar){a._timerToolbar=setTimeout(function(){a.updateToolbar();a._timerToolbar=null},250)}};Xinha.prototype._shortCuts=function(b){var a=this.getKey(b).toLowerCase();var d=null;var c=null;switch(a){case"b":d="bold";break;case"i":d="italic";break;case"u":d="underline";break;case"s":d="strikethrough";break;case"l":d="justifyleft";break;case"e":d="justifycenter";break;case"r":d="justifyright";break;case"j":d="justifyfull";break;case"z":d="undo";break;case"y":d="redo";break;case"v":d="paste";break;case"n":d="formatblock";c="p";break;case"0":d="killword";break;case"1":case"2":case"3":case"4":case"5":case"6":d="formatblock";c="h"+a;break}if(d){this.execCommand(d,false,c);Xinha._stopEvent(b)}};Xinha.prototype.convertNode=function(a,c){var b=this._doc.createElement(c);while(a.firstChild){b.appendChild(a.firstChild)}return b};Xinha.prototype.scrollToElement=function(b){if(!b){b=this.getParentElement();if(!b){return}}var a=Xinha.getElementTopLeft(b);this._iframe.contentWindow.scrollTo(a.left,a.top)};Xinha.prototype.getEditorContent=function(){return this.outwardHtml(this.getHTML())};Xinha.prototype.setEditorContent=function(a){this.setHTML(this.inwardHtml(a))};Xinha.updateTextareas=function(){var b;for(var a=0;a<__xinhas.length;a++){b=__xinhas[a];b._textArea.value=b.getEditorContent()}};Xinha.prototype.getHTML=function(){var a="";switch(this._editMode){case"wysiwyg":if(!this.config.fullPage){a=Xinha.getHTML(this._doc.body,false,this).trim()}else{a=this.doctype+"\n"+Xinha.getHTML(this._doc.documentElement,true,this)}break;case"textmode":a=this._textArea.value;break;default:alert("Mode <"+this._editMode+"> not defined!");return false}return a};Xinha.prototype.outwardHtml=function(c){for(var b in this.plugins){var d=this.plugins[b].instance;if(d&&typeof d.outwardHtml=="function"){c=d.outwardHtml(c)}}c=c.replace(/<(\/?)b(\s|>|\/)/ig,"<$1strong$2");c=c.replace(/<(\/?)i(\s|>|\/)/ig,"<$1em$2");c=c.replace(/<(\/?)strike(\s|>|\/)/ig,"<$1del$2");c=c.replace(/(<[^>]*on(click|mouse(over|out|up|down))=['"])if\(window\.parent && window\.parent\.Xinha\)\{return false\}/gi,"$1");var a=location.href.replace(/(https?:\/\/[^\/]*)\/.*/,"$1")+"/";c=c.replace(/https?:\/\/null\//g,a);c=c.replace(/((href|src|background)=[\'\"])\/+/ig,"$1"+a);c=this.outwardSpecialReplacements(c);c=this.fixRelativeLinks(c);if(this.config.sevenBitClean){c=c.replace(/[^ -~\r\n\t]/g,function(e){return(e!=Xinha.cc)?"&#"+e.charCodeAt(0)+";":e})}c=c.replace(/(]*((type=[\"\']text\/)|(language=[\"\'])))(freezescript)/gi,"$1javascript");if(this.config.fullPage){c=Xinha.stripCoreCSS(c)}if(typeof this.config.outwardHtml=="function"){c=this.config.outwardHtml(c)}return c};Xinha.prototype.inwardHtml=function(b){for(var a in this.plugins){var c=this.plugins[a].instance;if(c&&typeof c.inwardHtml=="function"){b=c.inwardHtml(b)}}b=b.replace(/<(\/?)del(\s|>|\/)/ig,"<$1strike$2");b=b.replace(/(<[^>]*on(click|mouse(over|out|up|down))=["'])/gi,"$1if(window.parent && window.parent.Xinha){return false}");b=this.inwardSpecialReplacements(b);b=b.replace(/(]*((type=[\"\']text\/)|(language=[\"\'])))(javascript)/gi,"$1freezescript");var d=new RegExp("((href|src|background)=['\"])/+","gi");b=b.replace(d,"$1"+location.href.replace(/(https?:\/\/[^\/]*)\/.*/,"$1")+"/");b=this.fixRelativeLinks(b);if(this.config.fullPage){b=Xinha.addCoreCSS(b)}if(typeof this.config.inwardHtml=="function"){b=this.config.inwardHtml(b)}return b};Xinha.prototype.outwardSpecialReplacements=function(b){for(var a in this.config.specialReplacements){var e=this.config.specialReplacements[a];var d=a;if(typeof e.replace!="function"||typeof d.replace!="function"){continue}var c=new RegExp(Xinha.escapeStringForRegExp(e),"g");b=b.replace(c,d.replace(/\$/g,"$$$$"))}return b};Xinha.prototype.inwardSpecialReplacements=function(b){for(var a in this.config.specialReplacements){var e=a;var d=this.config.specialReplacements[a];if(typeof e.replace!="function"||typeof d.replace!="function"){continue}var c=new RegExp(Xinha.escapeStringForRegExp(e),"g");b=b.replace(c,d.replace(/\$/g,"$$$$"))}return b};Xinha.prototype.fixRelativeLinks=function(g){if(typeof this.config.expandRelativeUrl!="undefined"&&this.config.expandRelativeUrl){if(g==null){return""}var a=g.match(/(src|href)="([^"]*)"/gi);var j=document.location.href;if(a){var d,k,l,m,c;for(var f=0;f not defined!");return false}return a};Xinha.prototype.setHTML=function(a){if(!this.config.fullPage){this._doc.body.innerHTML=a}else{this.setFullHTML(a)}this._textArea.value=a};Xinha.prototype.setDoctype=function(a){this.doctype=a};Xinha._object=null;Array.prototype.isArray=true;RegExp.prototype.isRegExp=true;Xinha.cloneObject=function(obj){if(!obj){return null}var newObj=obj.isArray?[]:{};if(obj.constructor.toString().match(/\s*function Function\(/)||typeof obj=="function"){newObj=obj}else{if(obj.isRegExp){newObj=eval(obj.toString())}else{for(var n in obj){var node=obj[n];if(typeof node=="object"){newObj[n]=Xinha.cloneObject(node)}else{newObj[n]=node}}}}return newObj};Xinha.flushEvents=function(){var a=0;var c=Xinha._eventFlushers.pop();while(c){try{if(c.length==3){Xinha._removeEvent(c[0],c[1],c[2]);a++}else{if(c.length==2){c[0]["on"+c[1]]=null;c[0]._xinha_dom0Events[c[1]]=null;a++}}}catch(b){}c=Xinha._eventFlushers.pop()}};Xinha._eventFlushers=[];if(document.addEventListener){Xinha._addEvent=function(a,c,b){a.addEventListener(c,b,false);Xinha._eventFlushers.push([a,c,b])};Xinha._removeEvent=function(a,c,b){a.removeEventListener(c,b,false)};Xinha._stopEvent=function(a){a.preventDefault();a.stopPropagation()}}else{if(document.attachEvent){Xinha._addEvent=function(a,c,b){a.attachEvent("on"+c,b);Xinha._eventFlushers.push([a,c,b])};Xinha._removeEvent=function(a,c,b){a.detachEvent("on"+c,b)};Xinha._stopEvent=function(b){try{b.cancelBubble=true;b.returnValue=false}catch(a){}}}else{Xinha._addEvent=function(a,c,b){alert("_addEvent is not supported")};Xinha._removeEvent=function(a,c,b){alert("_removeEvent is not supported")};Xinha._stopEvent=function(a){alert("_stopEvent is not supported")}}}Xinha._addEvents=function(c,a,d){for(var b=a.length;--b>=0;){Xinha._addEvent(c,a[b],d)}};Xinha._removeEvents=function(c,a,d){for(var b=a.length;--b>=0;){Xinha._removeEvent(c,a[b],d)}};Xinha.addOnloadHandler=function(c,b){b=b?b:window;var d=function(){if(arguments.callee.done){return}arguments.callee.done=true;if(Xinha.onloadTimer){clearInterval(Xinha.onloadTimer)}c()};if(Xinha.is_ie){b.document.write(""); -var _22=document.getElementById("__ie_onload"); -_22.onreadystatechange=function(){ -if(this.readyState=="loaded"){ -_21(); -} -}; -}else{ -if(/WebKit/i.test(navigator.userAgent)){ -Xinha.onloadTimer=setInterval(function(){ -if(/loaded|complete/.test(document.readyState)){ -_21(); -} -},10); -}else{ -document.addEventListener("DOMContentLoaded",_21,false); -} -} -}; - +/* This compressed file is part of Xinha. For uncomressed sources, forum, and bug reports, go to xinha.org */ +var Xinha={};if(!window._editor_url){var scripts=document.getElementsByTagName("script");var this_script=scripts[scripts.length-1];var args=this_script.src.split("?");args=args.length==2?args[1].split("&"):"";for(var index=0;index=9.1)||Xinha.ie_version>=5.5||Xinha.is_safari;Xinha.loadPlugins=function(a,b){if(!Xinha.isSupportedBrowser){return}Xinha.loadStyle(typeof _editor_css=="string"?_editor_css:"Xinha.css","XinhaCoreDesign");Xinha.createLoadingMessages(xinha_editors);var c=Xinha.loadingMessages;Xinha._loadback(_editor_url+"XinhaCore.js",function(){Xinha.removeLoadingMessages(xinha_editors);Xinha.createLoadingMessages(xinha_editors);b()});return false};Xinha._loadback=function(f,b,a,e){var c=!Xinha.is_ie?"onload":"onreadystatechange";var d=document.createElement("script");d.type="text/javascript";d.src=f;if(b){d[c]=function(){if(Xinha.is_ie&&(!(/loaded|complete/.test(window.event.srcElement.readyState)))){return}b.call(a?a:this,e);d[c]=null}}document.getElementsByTagName("head")[0].appendChild(d)};Xinha.getElementTopLeft=function(a){var c=0;var b=0;if(a.offsetParent){c=a.offsetLeft;b=a.offsetTop;while(a=a.offsetParent){c+=a.offsetLeft;b+=a.offsetTop}}return{top:b,left:c}};Xinha.findPosX=function(a){var b=0;if(a.offsetParent){return Xinha.getElementTopLeft(a).left}else{if(a.x){b+=a.x}}return b};Xinha.findPosY=function(b){var a=0;if(b.offsetParent){return Xinha.getElementTopLeft(b).top}else{if(b.y){a+=b.y}}return a};Xinha.createLoadingMessages=function(b){if(Xinha.loadingMessages||!Xinha.isSupportedBrowser){return}Xinha.loadingMessages=[];for(var a=0;a<\/script>");var a=document.getElementById("__ie_onload");a.onreadystatechange=function(){if(this.readyState=="loaded"){c()}}}else{if(/WebKit/i.test(navigator.userAgent)){Xinha.onloadTimer=setInterval(function(){if(/loaded|complete/.test(document.readyState)){c()}},10)}else{document.addEventListener("DOMContentLoaded",c,false)}}}; \ No newline at end of file Index: openacs-4/packages/acs-templating/www/resources/xinha-nightly/htmlarea.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/www/resources/xinha-nightly/htmlarea.js,v diff -u -r1.10 -r1.11 --- openacs-4/packages/acs-templating/www/resources/xinha-nightly/htmlarea.js 13 May 2008 18:53:44 -0000 1.10 +++ openacs-4/packages/acs-templating/www/resources/xinha-nightly/htmlarea.js 16 Jan 2009 08:36:13 -0000 1.11 @@ -1,11 +1,23 @@ -/* This compressed file is part of Xinha. For uncompressed sources, forum, and bug reports, go to xinha.org */ -/* This file is part of version 0.95 released Mon, 12 May 2008 17:33:15 +0200 */ -/* The URL of the most recent version of this file is http://svn.xinha.webfactional.com/trunk/htmlarea.js */ -if(typeof _editor_url=="string"){ -_editor_url=_editor_url.replace(/\x2f*$/,"/"); -}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=""; + + /*--------------------------------------:noTabs=true:tabSize=2:indentSize=2:-- + -- COMPATABILITY FILE + -- htmlarea.js is now XinhaCore.js + -- + -- $HeadURL:http://svn.xinha.webfactional.com/trunk/htmlarea.js $ + -- $LastChangedDate:2007-01-15 15:28:57 +0100 (Mo, 15 Jan 2007) $ + -- $LastChangedRevision:659 $ + -- $LastChangedBy:gogo $ + --------------------------------------------------------------------------*/ + +if ( typeof _editor_url == "string" ) +{ + // Leave exactly one backslash at the end of _editor_url + _editor_url = _editor_url.replace(/\x2f*$/, '/'); } -document.write(""); +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 = ''; +} +document.write(''); \ 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 -r1.5 -r1.6 --- openacs-4/packages/acs-templating/www/resources/xinha-nightly/release-notes.txt 13 May 2008 18:53:44 -0000 1.5 +++ openacs-4/packages/acs-templating/www/resources/xinha-nightly/release-notes.txt 16 Jan 2009 08:36:13 -0000 1.6 @@ -1,212 +1,278 @@ -Xinha - The Community-Built Online HTML Editor - -For bug reports, forum, and updates go to -http://xinha.org - -Release History -Xinha 0.95 -Bugs Fixed - * fixed #1040 htmlRemoveTags doesn't work in IE - * fixed #645 IE Save as function only saves the original html - * fixed #1136 FF3 Linux select boxes in toolbar are too small - * fixed #1100 Extended File Manager - Error after opening window - * fixed #1103 [TransformInnerHTML] IE breaks singlet attributes starting with "no" - * fixed #1086 Repeated javascript insertion in onclick attributes - * fixed #1094 IE throws error in Xinha.loadStyle function - * fixed #1117 IE returns javascript error -1072896658 - * fixed #993 PageStyle to override styles in PageStylesheets - * #1112 switching between modes leaves strange characters in source - * fixed #1128 loading fails when Fullscreen tried to load as plugin - * fixed #1126 Percent (%) in URL prevent stripSelfNamedAnchors from working - * fixed #1120 HTML select overlaps color picker in IE6 - * #1115 + #1127 fixed compatibility issues with Firefox 3 - * #961 + #1130 changed behaviour of xinha_config.baseHref - * fixed #645 Save as function only saves the original html - * fixed #1040 htmlRemoveTags doesn't work in IE - * fixed #1015 Mozilla shows scrollbars on click in Stylist - * #918 removed mozParaHandler dirty as it had been broken for a long time - * fixed #1015 Mozilla shows scrollbars on click in Stylist - * fixed #1148 HTML entities break when cursor is inside when switching from HTML to WYSIWYG - * fixed #1151 form action always made absolute - * fixed #1155 InsertAnchor broken in IE 7 - * fixed #1158 [ImageManager] in Japanese environment, an error occurs by reading of lang/ja.js in IE6/7 - * fixed #1152 Plugins using surroundHTML (EditTag, LangMarks) no longer work in IE7 - * fixed #1161 permission error from ColorPicker.js - * fixed #1181 [TableOperations] Table Options dialog first entry for border style faulty - * fixed #1185 [TableOperations] IE: style float broken - * fixed #1197 [Linker] IE shows bug in line 262 - * fixed #1200 [Linker] Dialog does not show if scanned folder empty - -Enhancements - * #1143 add Safari support - * #938 add Opera support - * #1138 added API functions Xinha.getEditor(), Xinha.prototype.getPluginInstance(), Xinha.addOnloadHandler() - * #1137 [Equation] FF3 fixes & improved way of avoiding formula changes in editor - * #1150 synchronize "Remove Format" between browsers - * added plugin PreserveScripts for enhanced editing of pages containing PHP and/or JavaScript () - * Loading message facelift - * added XinhaLoader.js for enhanced user experience through early loading message - * made Xinha.makeEditors accept a DOM reference to the textarea instead of the id as part of xinha_editors array (#1105) - * #1123 Allow return of PHP array from xinha_pass_to_php_backend - * [Linker] scan.php: Allow specification of base url to use (so that a subdirectory can be used as $dir and return appropriate urls to the files (prefixing the url - * [ExtendedFileManager] new Version - * #961 + #1130 changed behaviour of xinha_config.baseHref - * #1137 [Equation] improved way of avoiding formula changes in editor - * #442 removed alert "Your Document is not well formed..." - * #1119 disabled Firefox 2 spell check when ContextMenu is enabled - * added a plugin "GenericPlugin" as a democase for plugin event handlers - * #1171 [SmartReplace] now also replaces three dots with an ellipsis - * #1119 [ContextMenu] optionally switch of Firefox Spell check - * #1172 [LangMarks] make available languages configurable - * enhanced behaviour when xinha_config.baseHref is set to another server - * #1195 Allow to specify an external url to load a plugin from - * #1201 Add inwardHtml/outwardHtml functions to Config object - -I18n - * #1109 Spanish language extended - * #1116 [ExtendedFileManager] added French translation - * #853 updated Translation for farsi - * fixed wrong encoding in Spanish language file - * fixed no bold/italic/underline button images in Spanish - * #1194 [ExtendedFileManager] updated French translation - - -Xinha 0.94 - * Ticket #1093 [InsertSmiley] remove smiley gifs from trunk - * fixed Ticket #1019 Cusor not jumping to editable part of window when clicked in IE - * [TableOperations] Add config option to not dispaly toolbar buttons - * fixed Ticket #1021 Prevent ExtendedFileManager from masking ImageManager - * fixed Ticket #1023 [ImageManager] Add config item to allow the advanced image options to be hidden from the user - * fixed Ticket #1026 fix problems with loading skins - * fixed Tickets #1030 & #1031: slow loading large pages in IE - * fixed Ticket #1034 [ExtendedFileManager] Color pickers shown when use_color_pickers is false - * fixed Ticket #1035 [TransformInnerHTML] tags corruptedunder certain circumstances - * fixed Ticket #1036 [ExtendedFileManager] window is only resized after all thumbnails have benn loaded, which can take quite some time - * fixed Ticket #1039 Firefox full page adds multiple paragraphs after view source - * fixed Ticket #1019 Cusor not jumping to editable part of window when clicked in IE7 - * fixed Ticket #1046 Error in IE 6 when switching from text to wysiwyg - * [DOMwalk] linebreaks inserted before
s - * catch error in IE when trying to restore selection on non-displayed area - * fixed Ticket #973 Error switching wysiwyg/html including javascript file on the code - * fixed Ticket #1028 - [Linker] automatically (attempt to) work around an issue with mod_security being triggered because of the charset on our POST requests - * fixed Ticket #1055 [Stylist] Inappropriate styles (for other tags) are shown - * added Dutch language files - * added new hook 'onBeforeSubmit' for firePluginEvent() - * added new hook 'onBeforeUnload' for firePluginEvent() - * fixed Ticket #1048 Full Screen plugin doesn't load if many editors on page - * fixed Ticket #1053 ListType plugin doesn't work in panel config with multiple editors - * fixed Ticket #1026 Skins referenced with -tags don't work anymore - * fixed Ticket #1059 [Equation] loosing formula onsubmit - * fixed Ticket #1060 [Equation] various updates - * [Equation] preserve formula on reload in Mozilla - * [Equation] updated ASCIIMathML.js - * [Skin:silva] padding and border on textarea make the textmode too wide - * fixed Ticket#1001 Editor loads a bunch of null urls in ie - * fixed Ticket #1068 [TranformInnerHTML] newlines added after - * fixed Ticket#1069 Editor document URL prefixed to any href that only consists of URL parameters - * added Thai translation for core - * added complete Portuguese Brazilian translation - * updated lc_parse script - * fixed Ticket #1071 [ExtendedFileManager] external image URL image inserted with width/height 0, amking it invisible - * fixed Ticket #1074 [SuperClean] throws warnings in PHP 5 - * fixed Ticket #1079 [DynamicCSS] lists Xinha internal CSS - * fixed Ticket #1080 Some plugins leave behind stylesheet links in fullpage mode - * fixed Ticket #1083 Convert URLs to links - Error - * fixed Ticket #1084 URL auto-linking (Gecko): URLs with user:password@domain.tld falsely recognized as email address - * fixed Ticket #1085 URL auto-linking (Gecko): IP numbers don't work - * fixed Ticket #1081 Control character is not being removed inside SCRIPT tags or HEAD when switching from textmode to htmlmode - * fixed Ticket #1078 [InsertImage] spacing attributes: inconsistent behaviour when editing image - * fixed Ticket #1089 [Color Picker] Localize OK Label - * fixed Ticket #1091 [SaveSubmit] does not correctly submit value of checkboxes and radio buttons - -Xinha 0.93 - - fixed Ticket #967 Font Color Picker stops working after using one of ImageManager, ExtendedFileManager, FullPage, or HorizontalRule - - fixed Ticket #965 When switching between Xinhas in the same page, in textmode toolbar stays disabled - - fixwd Ticket #963 DOMwalk IE: head tag attributes without quotes and closing slash - - Ticket #962 DOMwalk Mozilla: improved source indentation - - fixed Ticket #957 If item in in xinha_editors is not a textarea: skip gracefully - - fixed Ticket #900: catch an fatal error that occured sometimes when switching between modes in fullpage mode in Mozilla - - fixed Ticket #969 DOMwalk Gecko: line breaks rendered as
s inside
 blocks
- - fixed Ticket #976 Loading message misplaced in IE7
- - fixed Ticket #977 TableOperations toolbar off-place in ext_example.html
- - fixed Ticket #978 defining a padding for s in global css affects Xinha framework
- - Ticket #979 improve checking for non-supported browsers
- - fixed Ticket #934 SuperClean plugin returns just quotation when executed on localhost
- - Ticket #929 Save changes on page unload fixed for Mozilla 
- - fixed Ticket #980 ImageManager color format bug
- - fixed Ticket #981 No doctype in iframe content document/ editor always in quirks mode
- - fixed Ticket #543 Stylist Panel overflow broken
- - Ticket #983 added id for iframe
- - fixed Ticket #984 !ExtendedFileManager produces php warning
- - optimized icon file size
- - fixed !JavaScript error in !ImageManager/!ExtendedFileManager image editor
- - Ticket #908* Prompts broken in IE7: fixed for EFM, !ImageManager & !TableOperations
- - Fixes for TableOperations, tickets #82, #908*, #912 and #947
- - fixed Ticket #998* whitespace added before and/or after content (in non-fullpage mode)
- - fixed slow unloading in Mozilla
- - Fix focus problem when switching from html to wysiwyg in Gecko. See ticket #900.
- - fixed toolbar floating issue
- - fixed #1003 HTML length limited to 1024 characters with plugin CharCounter
- - Ticket #1000 new public methods for getting/setting editor content
- - fixed #735 - IE eating scripts and comments at the beginning of pages.
- - Added new config variables to set iframe width if less than editor width (ticket:322) and set alignment of toolbar buttons.
- - added Basque translation for XinhaCore
- - prevent an error if server is set to parse .js files as PHP
- - Ticket #127 plugin HtmlEntities: Entities.js  file corrupt
-
-Xinha 0.92beta
- - fixed Ticket #831 stop empty anchors from being removed
- - Make htmlarea.js just load XinhaCore.js instead of being a copy of it.
- - fixed Ticket #445 Toggle TableBorder doesn't work if this.fullpage=true or using FullPage plugin
- - fixed Ticket #551 shape and coord attributes of area element are ignored by IE
- - fixed Ticket #650 SpellChecker is not compatible with FullPage plugin
- - fixed Ticket #816 CharacterMap and ListType panel modes make editor jump to top in IE
- - fixed Ticket #570 change behaviour of justify when an image is selected to make the image float left/right, 
-   click the justify button again to undo it
- - fixed Ticket #891 noscript content got escaped
- - fixed Ticket #857 Firefox fails to load in fullpage mode when  tag in wrong place.
- - fixed Ticket #841 Spell Checker - Won't return to xinha.
- - fixed Ticket #914 All buttons stay grey & this.getParentElement is not a function message when not calling
-   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
- - the core file is now named XinhaCore.js instead of htmlarea.js,
-   please change your pages accordingly (the htmlarea.js will be removed!)
- - the color picker script is now loaded on demand to reduce initial loading time
- 
-Xinha 0.9beta
-This equals Xinha revision 635 of Jan 11 2007
- - All JavaScript files over 2kb have been compressed using the dojo JavaScript compressor
- - All gifs have been optimized using Trout's GIF Optimizer version 2.3
\ No newline at end of file
+Xinha - The Community-Built Online HTML Editor
+
+For bug reports, forum, and updates go to 
+http://xinha.org
+
+Release History
+Xinha 0.96beta
+Bugs Fixed
+ * #314 Status bar should wrap
+ * #741 ContextMenu should not overflow window boundaries
+ * #961 baseHref not correctly treated when stripping
+ * #1160 Safari puts selected HTML near bottom if edited
+ * #1166 TableOperations dialogs do not resize properly in Safari 3
+ * #1173 IE8 beta toolbars broken
+ * #1174 IE8 beta no text cursor in wysiwyg
+ * #1187 ExtendedFileManager "imgManager.changeDir is not a function" error
+ * #1193 Stylist bug when formatting selected text
+ * #1213 Would be nice to protect unsaved changes from accidental loss when navigating away
+ * #1221 Selecting heading normal on nothing throws exception alert
+ * #1224 sevenbitclean? / ghost cursor error with html mode toggle (Firefox)
+ * #1227 No CSS rules load when using @import in external stylesheet
+ * #1230 CSS width attribute breaks select display in IE
+ * #1240 Linker: trim spaces from URL
+ * #1247 CharCounter problems with Silva skin
+ * #1257 Error if url query string included '/'
+ * #1258 Event object is not handed over to event handlers installed on textarea
+ * #1261 Dutch translation for Fullscreen module
+ * #1280 restoreSelection doesn't always work in internet explorer
+ * #1281 selectNodeContents is borken in IE when the node is a text node
+ * #1284 _editor_url is still used in a couple of plugins.
+ * #1286 use callbacks as criteria for getFirstAncestor
+ * #1288 [DefinitionList] list items restricted to small width and one line by CSS
+ * #1290 Improved support for pasting from Microsoft Word
+ * #1291 Xinha.removeFromParent() does not return correct reference
+ * #1292 change naming scheme of plugin files
+ * #1293 [Gecko] Window scrolls to top of editing area when switching from text to WYSIWYG
+ * #1294 Editor higher in HTML mode
+ * #1295 Textarea not aligned under toolbar
+ * #1298 CSS styling gets inserted into table cell after viewing source (Safari only)
+ * #1300 create namespace for plugins within Xinha namespace
+ * #1301 loading should not fail if plugin omits _pluginInfo
+ * #1302 add Array.prototype.forEach for Browser that doesn't support it
+ * #1303 add getElementsByClassName()
+ * #1306 Toolbar actions need access to the click event
+ * #1309 Xinha chokes on anchors
+ * #1315 Xinha's _addEvent uses event capturing
+ * #1316 In InternetExplorer, the cursor is lost when switching into source mode
+ * #1317 Xinha's postback and getback should allow for failure handlers
+ * #1319 make event hooks like onKeyPress accesible from the config object
+ * #1320 make it possible to use png images as icons in IE6
+ * #1321 [SaveSubmit] icon is in "changed" state initially
+ * #1322 [SaveSubmit] error when form action is empty
+ * #1332 Panel classes are very generic, and risk conflict with users embedding it in their site
+ * #1337 GetHTML truncates hyperlinks
+ * #1346 statusbar shows b, i, strike instead of strong, em, and del
+ * #1357 safari form submit has empty form field names in POST data, causes failure with perl CGI
+
+ 
+Enhancements
+ * #1176 Completely revamped dialog system, which uses inline lightbox-style dialogs instead of separate popup windows 
+ * #326 Added support for customizable icon sets
+ * #1318 Added icon set from the Tango Project
+ * #1287 New InsertNote plugin for handling footnotes, with automatic note numbering and ordering, linking, and support for repeated references
+ * #1289 New InsertSnippet2 plugin, with categorization of snippets, search by name, and an XML data format
+ * #58 Additional settings for Linker plugin (link types and targets can be configured)
+ * #1219 Configuration option to autofocus editor
+ * #1285 Configuration option to set document body class
+ * #1323 Allow skins to have meta information (author, etc.)
+ * #1338 _editor_url is now automatically detected
+ * #1345 Add a static function that saves the contents of all Xinhas to their respective textareas
+
+
+Xinha 0.95
+Bugs Fixed
+ * fixed #1040 htmlRemoveTags doesn't work in IE 
+ * fixed #645 IE Save as function only saves the original html 
+ * fixed #1136 FF3 Linux select boxes in toolbar are too small 
+ * fixed #1100 Extended File Manager - Error after opening window
+ * fixed #1103 [TransformInnerHTML] IE breaks singlet attributes starting with "no"
+ * fixed #1086 Repeated javascript insertion in onclick attributes
+ * fixed #1094 IE throws error in Xinha.loadStyle function
+ * fixed  #1117 IE returns javascript error -1072896658
+ * fixed #993 PageStyle to override styles in PageStylesheets
+ * #1112 switching between modes leaves strange characters in source 
+ * fixed #1128 loading fails when Fullscreen tried to load as plugin
+ * fixed #1126 Percent (%) in URL prevent stripSelfNamedAnchors from working  
+ * fixed #1120 HTML select overlaps color picker in IE6
+ * #1115 + #1127 fixed compatibility issues with Firefox 3
+ * #961 +  #1130 changed behaviour of xinha_config.baseHref
+ * fixed #645 Save as function only saves the original html
+ * fixed #1040 htmlRemoveTags doesn't work in IE
+ * fixed #1015 Mozilla shows scrollbars on click in Stylist 
+ * #918 removed mozParaHandler dirty as it had been broken for a long time
+ * fixed #1015 Mozilla shows scrollbars on click in Stylist 
+ * fixed #1148 HTML entities break when cursor is inside when switching from HTML to WYSIWYG 
+ * fixed #1151 form action always made absolute
+ * fixed #1155 InsertAnchor broken in IE 7
+ * fixed #1158 [ImageManager] in Japanese environment, an error occurs by reading of lang/ja.js in IE6/7 
+ * fixed #1152 Plugins using surroundHTML (EditTag, LangMarks) no longer work in IE7
+ * fixed #1161 permission error from ColorPicker.js
+ * fixed #1181 [TableOperations] Table Options dialog first entry for border style faulty
+ * fixed #1185 [TableOperations] IE: style float broken
+ * fixed #1197 [Linker] IE shows bug in line 262
+ * fixed #1200 [Linker] Dialog does not show if scanned folder empty
+ 
+Enhancements
+ * #1143 add Safari support
+ * #938  add Opera support
+ * #1138 added API functions Xinha.getEditor(), Xinha.prototype.getPluginInstance(), Xinha.addOnloadHandler() 
+ * #1137 [Equation] FF3 fixes & improved way of avoiding formula changes in editor
+ * #1150 synchronize "Remove Format" between browsers
+ * added plugin PreserveScripts for enhanced editing of pages containing PHP and/or JavaScript ()
+ * Loading message facelift
+ * added XinhaLoader.js for enhanced user experience through early loading message
+ * made Xinha.makeEditors accept a DOM reference to the textarea instead of the id as part of xinha_editors array (#1105)
+ * #1123 Allow return of PHP array from xinha_pass_to_php_backend
+ * [Linker] scan.php: Allow specification of base url to use (so that a subdirectory can be used as $dir and return appropriate urls to the files (prefixing the url
+ * [ExtendedFileManager] new Version
+ * #961 +  #1130 changed behaviour of xinha_config.baseHref
+ * #1137 [Equation] improved way of avoiding formula changes in editor
+ * #442 removed alert "Your Document is not well formed..."
+ * #1119 disabled Firefox 2 spell check when ContextMenu is enabled 
+ * added a plugin "GenericPlugin" as a democase for plugin event handlers
+ * #1171 [SmartReplace] now also replaces three dots with an ellipsis
+ * #1119 [ContextMenu] optionally switch of Firefox Spell check
+ * #1172 [LangMarks] make available languages configurable
+ * enhanced behaviour when xinha_config.baseHref is set to another server
+ * #1195 Allow to specify an external url to load a plugin from
+ * #1201 Add inwardHtml/outwardHtml functions to Config object
+ 
+I18n
+ * #1109 Spanish language extended
+ * #1116 [ExtendedFileManager] added French translation
+ * #853 updated Translation for farsi
+ * fixed wrong encoding in Spanish language file 
+ * fixed no bold/italic/underline button images in Spanish
+ *  #1194 [ExtendedFileManager] updated French translation
+
+ 
+Xinha 0.94
+ * Ticket #1093 [InsertSmiley] remove smiley gifs from trunk
+ * fixed Ticket #1019 Cusor not jumping to editable part of window when clicked in IE
+ * [TableOperations] Add config option to not dispaly toolbar buttons
+ * fixed Ticket #1021  Prevent ExtendedFileManager from masking ImageManager
+ * fixed Ticket #1023 [ImageManager] Add config item to allow the advanced image options to be hidden from the user
+ * fixed Ticket #1026 fix problems with loading skins
+ * fixed Tickets #1030 & #1031: slow loading large pages in IE
+ * fixed Ticket #1034 [ExtendedFileManager] Color pickers shown when use_color_pickers is false
+ * fixed Ticket #1035 [TransformInnerHTML] tags corruptedunder certain circumstances
+ * fixed Ticket #1036 [ExtendedFileManager] window is only resized after all thumbnails have benn loaded, which can take quite some time
+ * fixed Ticket #1039 Firefox full page adds multiple paragraphs after view source
+ * fixed Ticket #1019 Cusor not jumping to editable part of window when clicked in IE7
+ * fixed Ticket #1046 Error in IE 6 when switching from text to wysiwyg
+ * [DOMwalk] linebreaks inserted before 
s + * catch error in IE when trying to restore selection on non-displayed area + * fixed Ticket #973 Error switching wysiwyg/html including javascript file on the code + * fixed Ticket #1028 - [Linker] automatically (attempt to) work around an issue with mod_security being triggered because of the charset on our POST requests + * fixed Ticket #1055 [Stylist] Inappropriate styles (for other tags) are shown + * added Dutch language files + * added new hook 'onBeforeSubmit' for firePluginEvent() + * added new hook 'onBeforeUnload' for firePluginEvent() + * fixed Ticket #1048 Full Screen plugin doesn't load if many editors on page + * fixed Ticket #1053 ListType plugin doesn't work in panel config with multiple editors + * fixed Ticket #1026 Skins referenced with -tags don't work anymore + * fixed Ticket #1059 [Equation] loosing formula onsubmit + * fixed Ticket #1060 [Equation] various updates + * [Equation] preserve formula on reload in Mozilla + * [Equation] updated ASCIIMathML.js + * [Skin:silva] padding and border on textarea make the textmode too wide + * fixed Ticket#1001 Editor loads a bunch of null urls in ie + * fixed Ticket #1068 [TranformInnerHTML] newlines added after + * fixed Ticket#1069 Editor document URL prefixed to any href that only consists of URL parameters + * added Thai translation for core + * added complete Portuguese Brazilian translation + * updated lc_parse script + * fixed Ticket #1071 [ExtendedFileManager] external image URL image inserted with width/height 0, amking it invisible + * fixed Ticket #1074 [SuperClean] throws warnings in PHP 5 + * fixed Ticket #1079 [DynamicCSS] lists Xinha internal CSS + * fixed Ticket #1080 Some plugins leave behind stylesheet links in fullpage mode + * fixed Ticket #1083 Convert URLs to links - Error + * fixed Ticket #1084 URL auto-linking (Gecko): URLs with user:password@domain.tld falsely recognized as email address + * fixed Ticket #1085 URL auto-linking (Gecko): IP numbers don't work + * fixed Ticket #1081 Control character is not being removed inside SCRIPT tags or HEAD when switching from textmode to htmlmode + * fixed Ticket #1078 [InsertImage] spacing attributes: inconsistent behaviour when editing image + * fixed Ticket #1089 [Color Picker] Localize OK Label + * fixed Ticket #1091 [SaveSubmit] does not correctly submit value of checkboxes and radio buttons + +Xinha 0.93 + - fixed Ticket #967 Font Color Picker stops working after using one of ImageManager, ExtendedFileManager, FullPage, or HorizontalRule + - fixed Ticket #965 When switching between Xinhas in the same page, in textmode toolbar stays disabled + - fixwd Ticket #963 DOMwalk IE: head tag attributes without quotes and closing slash + - Ticket #962 DOMwalk Mozilla: improved source indentation + - fixed Ticket #957 If item in in xinha_editors is not a textarea: skip gracefully + - fixed Ticket #900: catch an fatal error that occured sometimes when switching between modes in fullpage mode in Mozilla + - fixed Ticket #969 DOMwalk Gecko: line breaks rendered as
s inside
 blocks
+ - fixed Ticket #976 Loading message misplaced in IE7
+ - fixed Ticket #977 TableOperations toolbar off-place in ext_example.html
+ - fixed Ticket #978 defining a padding for s in global css affects Xinha framework
+ - Ticket #979 improve checking for non-supported browsers
+ - fixed Ticket #934 SuperClean plugin returns just quotation when executed on localhost
+ - Ticket #929 Save changes on page unload fixed for Mozilla 
+ - fixed Ticket #980 ImageManager color format bug
+ - fixed Ticket #981 No doctype in iframe content document/ editor always in quirks mode
+ - fixed Ticket #543 Stylist Panel overflow broken
+ - Ticket #983 added id for iframe
+ - fixed Ticket #984 !ExtendedFileManager produces php warning
+ - optimized icon file size
+ - fixed !JavaScript error in !ImageManager/!ExtendedFileManager image editor
+ - Ticket #908* Prompts broken in IE7: fixed for EFM, !ImageManager & !TableOperations
+ - Fixes for TableOperations, tickets #82, #908*, #912 and #947
+ - fixed Ticket #998* whitespace added before and/or after content (in non-fullpage mode)
+ - fixed slow unloading in Mozilla
+ - Fix focus problem when switching from html to wysiwyg in Gecko. See ticket #900.
+ - fixed toolbar floating issue
+ - fixed #1003 HTML length limited to 1024 characters with plugin CharCounter
+ - Ticket #1000 new public methods for getting/setting editor content
+ - fixed #735 - IE eating scripts and comments at the beginning of pages.
+ - Added new config variables to set iframe width if less than editor width (ticket:322) and set alignment of toolbar buttons.
+ - added Basque translation for XinhaCore
+ - prevent an error if server is set to parse .js files as PHP
+ - Ticket #127 plugin HtmlEntities: Entities.js  file corrupt
+
+Xinha 0.92beta
+ - fixed Ticket #831 stop empty anchors from being removed
+ - Make htmlarea.js just load XinhaCore.js instead of being a copy of it.
+ - fixed Ticket #445 Toggle TableBorder doesn't work if this.fullpage=true or using FullPage plugin
+ - fixed Ticket #551 shape and coord attributes of area element are ignored by IE
+ - fixed Ticket #650 SpellChecker is not compatible with FullPage plugin
+ - fixed Ticket #816 CharacterMap and ListType panel modes make editor jump to top in IE
+ - fixed Ticket #570 change behaviour of justify when an image is selected to make the image float left/right, 
+   click the justify button again to undo it
+ - fixed Ticket #891 noscript content got escaped
+ - fixed Ticket #857 Firefox fails to load in fullpage mode when  tag in wrong place.
+ - fixed Ticket #841 Spell Checker - Won't return to xinha.
+ - fixed Ticket #914 All buttons stay grey & this.getParentElement is not a function message when not calling
+   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
+ - the core file is now named XinhaCore.js instead of htmlarea.js,
+   please change your pages accordingly (the htmlarea.js will be removed!)
+ - the color picker script is now loaded on demand to reduce initial loading time
+ 
+Xinha 0.9beta
+This equals Xinha revision 635 of Jan 11 2007
+ - All JavaScript files over 2kb have been compressed using the dojo JavaScript compressor
+ - All gifs have been optimized using Trout's GIF Optimizer version 2.3
Index: openacs-4/packages/acs-templating/www/resources/xinha-nightly/contrib/dojo_js_compressor.jar
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/www/resources/xinha-nightly/contrib/Attic/dojo_js_compressor.jar,v
diff -u -r1.1 -r1.2
Binary files differ
Index: openacs-4/packages/acs-templating/www/resources/xinha-nightly/examples/ExtendedDemo.html
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/www/resources/xinha-nightly/examples/ExtendedDemo.html,v
diff -u -r1.1 -r1.2
--- openacs-4/packages/acs-templating/www/resources/xinha-nightly/examples/ExtendedDemo.html	13 May 2008 18:53:45 -0000	1.1
+++ openacs-4/packages/acs-templating/www/resources/xinha-nightly/examples/ExtendedDemo.html	16 Jan 2009 08:36:13 -0000	1.2
@@ -3,10 +3,10 @@
   
 
   
Index: openacs-4/packages/acs-templating/www/resources/xinha-nightly/examples/Newbie.html
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/www/resources/xinha-nightly/examples/Newbie.html,v
diff -u -r1.3 -r1.4
--- openacs-4/packages/acs-templating/www/resources/xinha-nightly/examples/Newbie.html	13 May 2008 18:53:45 -0000	1.3
+++ openacs-4/packages/acs-templating/www/resources/xinha-nightly/examples/Newbie.html	16 Jan 2009 08:36:13 -0000	1.4
@@ -5,12 +5,10 @@
   Xinha Newbie Guide
   
   
+  
   
-  
   
 
 
@@ -21,4 +19,4 @@
 
 
 
-
\ No newline at end of file
+
Index: openacs-4/packages/acs-templating/www/resources/xinha-nightly/examples/XinhaConfig.js
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/www/resources/xinha-nightly/examples/XinhaConfig.js,v
diff -u -r1.3 -r1.4
--- openacs-4/packages/acs-templating/www/resources/xinha-nightly/examples/XinhaConfig.js	13 May 2008 18:53:45 -0000	1.3
+++ openacs-4/packages/acs-templating/www/resources/xinha-nightly/examples/XinhaConfig.js	16 Jan 2009 08:36:13 -0000	1.4
@@ -1,20 +1,2 @@
-/* This compressed file is part of Xinha. For uncompressed sources, forum, and bug reports, go to xinha.org */
-/* This file is part of version 0.95 released Mon, 12 May 2008 17:33:15 +0200 */
-/* The URL of the most recent version of this file is http://svn.xinha.webfactional.com/trunk/examples/XinhaConfig.js */
-xinha_editors=null;
-xinha_init=null;
-xinha_config=null;
-xinha_plugins=null;
-xinha_init=xinha_init?xinha_init:function(){
-xinha_editors=xinha_editors?xinha_editors:["myTextArea","anotherOne"];
-xinha_plugins=xinha_plugins?xinha_plugins:["CharacterMap","ContextMenu","SmartReplace","Stylist","Linker","SuperClean","TableOperations"];
-if(!Xinha.loadPlugins(xinha_plugins,xinha_init)){
-return;
-}
-xinha_config=xinha_config?xinha_config():new Xinha.Config();
-xinha_config.pageStyleSheets=[_editor_url+"examples/full_example.css"];
-xinha_editors=Xinha.makeEditors(xinha_editors,xinha_config,xinha_plugins);
-Xinha.startEditors(xinha_editors);
-};
-Xinha.addOnloadHandler(xinha_init);
-
+/* This compressed file is part of Xinha. For uncomressed sources, forum, and bug reports, go to xinha.org */
+xinha_editors=null;xinha_init=null;xinha_config=null;xinha_plugins=null;xinha_init=xinha_init?xinha_init:function(){xinha_editors=xinha_editors?xinha_editors:["myTextArea","anotherOne"];xinha_plugins=xinha_plugins?xinha_plugins:["CharacterMap","ContextMenu","SmartReplace","Stylist","PersistentStorage","PSLocal","Linker","SuperClean","TableOperations"];if(!Xinha.loadPlugins(xinha_plugins,xinha_init)){return}xinha_config=xinha_config?xinha_config():new Xinha.Config();xinha_config.pageStyleSheets=[_editor_url+"examples/files/full_example.css"];xinha_config.stylistLoadStylesheet(_editor_url+"examples/files/stylist.css");xinha_editors=Xinha.makeEditors(xinha_editors,xinha_config,xinha_plugins);Xinha.startEditors(xinha_editors)};Xinha.addOnloadHandler(xinha_init);
\ No newline at end of file
Index: openacs-4/packages/acs-templating/www/resources/xinha-nightly/examples/testbed.html
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/www/resources/xinha-nightly/examples/testbed.html,v
diff -u -r1.7 -r1.8
--- openacs-4/packages/acs-templating/www/resources/xinha-nightly/examples/testbed.html	13 May 2008 18:53:45 -0000	1.7
+++ openacs-4/packages/acs-templating/www/resources/xinha-nightly/examples/testbed.html	16 Jan 2009 08:36:13 -0000	1.8
@@ -13,15 +13,15 @@
     --  of the file to remove the auto-example-generating code and allow for the
     --  use of the file as a boilerplate.
     --
-    --  $HeadURL:http://svn.xinha.webfactional.com/trunk/examples/testbed.html $
-    --  $LastChangedDate:2008-04-12 14:39:04 +0200 (Sa, 12 Apr 2008) $
-    --  $LastChangedRevision:987 $
-    --  $LastChangedBy:ray $
+    --  $HeadURL: http://svn.xinha.org/trunk/examples/testbed.html $
+    --  $LastChangedDate: 2008-10-12 19:42:42 +0200 (So, 12. Okt 2008) $
+    --  $LastChangedRevision: 1084 $
+    --  $LastChangedBy: ray $
     --------------------------------------------------------------------------->
 
   
   Example of Xinha
-  
+