Index: openacs-4/packages/xowiki/www/resources/wymeditor/jquery.wymeditor.pack.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/www/resources/wymeditor/jquery.wymeditor.pack.js,v diff -u -N --- openacs-4/packages/xowiki/www/resources/wymeditor/jquery.wymeditor.pack.js 27 Jul 2007 01:15:20 -0000 1.2 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1 +0,0 @@ -if(!WYM_STRINGS)var WYM_STRINGS=new Array();var WYM_STRINGS_EN={Strong:'Strong',Emphasis:'Emphasis',Superscript:'Superscript',Subscript:'Subscript',Ordered_List:'Ordered List',Unordered_List:'Unordered List',Indent:'Indent',Outdent:'Outdent',Undo:'Undo',Redo:'Redo',Link:'Link',Unlink:'Unlink',Image:'Image',Table:'Table',HTML:'HTML',Paragraph:'Paragraph',Heading_1:'Heading 1',Heading_2:'Heading 2',Heading_3:'Heading 3',Heading_4:'Heading 4',Heading_5:'Heading 5',Heading_6:'Heading 6',Preformatted:'Preformatted',Blockquote:'Blockquote',Table_Header:'Table Header',URL:'URL',Title:'Title',Alternative_Text:'Alternative text',Caption:'Caption',Number_Of_Rows:'Number of rows',Number_Of_Cols:'Number of cols',Submit:'Submit',Cancel:'Cancel',Choose:'Choose',Preview:'Preview',Paste_From_Word:'Paste from Word',Tools:'Tools',Containers:'Containers',Classes:'Classes',Status:'Status',Source_Code:'Source code'};WYM_STRINGS['en']=WYM_STRINGS_EN;if(!WYM_STRINGS)var WYM_STRINGS=new Array();var WYM_STRINGS_DE={Strong:'Fett',Emphasis:'Kursiv',Superscript:'Text hochstellen',Subscript:'Text tiefstellen',Ordered_List:'Geordnete Liste einfügen',Unordered_List:'Ungeordnete Liste einfügen',Indent:'Einzug erhöhen',Outdent:'Einzug vermindern',Undo:'Befehle rückgängig machen',Redo:'Befehle wiederherstellen',Link:'Hyperlink einfügen',Unlink:'Hyperlink entfernen',Image:'Bild einfügen',Table:'Tabelle einfügen',HTML:'HTML anzeigen/verstecken',Paragraph:'Absatz',Heading_1:'Überschrift 1',Heading_2:'Überschrift 2',Heading_3:'Überschrift 3',Heading_4:'Überschrift 4',Heading_5:'Überschrift 5',Heading_6:'Überschrift 6',Preformatted:'Vorformatiert',Blockquote:'Zitat',Table_Header:'Tabellenüberschrift',URL:'URL',Title:'Titel',Alternative_Text:'Alternativer Text',Caption:'Tabellenüberschrift',Number_Of_Rows:'Anzahl Zeilen',Number_Of_Cols:'Anzahl Spalten',Submit:'Absenden',Cancel:'Abbrechen',Choose:'Auswählen',Preview:'Vorschau',Paste_From_Word:'Aus Word einfügen',Tools:'Werkzeuge',Containers:'Inhaltstyp',Classes:'Klassen',Status:'Status',Source_Code:'Quellcode'};WYM_STRINGS['de']=WYM_STRINGS_DE;if(!WYM_STRINGS)var WYM_STRINGS=new Array();var WYM_STRINGS_ES={Strong:'Resaltar',Emphasis:'Enfatizar',Superscript:'Superindice',Subscript:'Subindice',Ordered_List:'Lista ordenada',Unordered_List:'Lista sin ordenar',Indent:'Indentado',Outdent:'Sin indentar',Undo:'Deshacer',Redo:'Rehacer',Link:'Enlazar',Unlink:'Eliminar enlace',Image:'Imagen',Table:'Tabla',HTML:'HTML',Paragraph:'Párrafo',Heading_1:'Cabecera 1',Heading_2:'Cabecera 2',Heading_3:'Cabecera 3',Heading_4:'Cabecera 4',Heading_5:'Cabecera 5',Heading_6:'Cabecera 6',Preformatted:'Preformateado',Blockquote:'Cita',Table_Header:'Cabecera de la tabla',URL:'URL',Title:'Título',Alternative_Text:'Texto alternativo',Caption:'Leyenda',Number_Of_Rows:'Número de filas',Number_Of_Cols:'Número de columnas',Submit:'Enviar',Cancel:'Cancelar',Choose:'Seleccionar',Preview:'Vista previa',Paste_From_Word:'Pegar desde Word',Tools:'Herramientas',Containers:'Contenedores',Classes:'Clases',Status:'Estado',Source_Code:'Código fuente'};WYM_STRINGS['es']=WYM_STRINGS_ES;if(!WYM_STRINGS)var WYM_STRINGS=new Array();var WYM_STRINGS_FR={Strong:'Mise en évidence',Emphasis:'Emphase',Superscript:'Exposant',Subscript:'Indice',Ordered_List:'Liste Ordonnée',Unordered_List:'Liste Non-Ordonnée',Indent:'Imbriqué',Outdent:'Non-imbriqué',Undo:'Annuler',Redo:'Rétablir',Link:'Lien',Unlink:'Supprimer le Lien',Image:'Image',Table:'Tableau',HTML:'HTML',Paragraph:'Paragraphe',Heading_1:'Titre 1',Heading_2:'Titre 2',Heading_3:'Titre 3',Heading_4:'Titre 4',Heading_5:'Titre 5',Heading_6:'Titre 6',Preformatted:'Pré-formatté',Blockquote:'Citation',Table_Header:'Cellule de titre',URL:'URL',Title:'Titre',Alternative_Text:'Texte alternatif',Caption:'Légende',Number_Of_Rows:'Nombre de lignes',Number_Of_Cols:'Nombre de colonnes',Submit:'Envoyer',Cancel:'Annuler',Choose:'Choisir',Preview:'Prévisualisation',Paste_From_Word:'Copier depuis Word',Tools:'Outils',Containers:'Type de texte',Classes:'Type de contenu',Status:'Infos',Source_Code:'Code source'};WYM_STRINGS['fr']=WYM_STRINGS_FR;var WYM_INSTANCES=new Array();var WYM_NAME="name";var WYM_INDEX="{Wym_Index}";var WYM_BASE_PATH="{Wym_Base_Path}";var WYM_CSS_PATH="{Wym_Css_Path}";var WYM_IFRAME_BASE_PATH="{Wym_Iframe_Base_Path}";var WYM_IFRAME_DEFAULT="iframe/default/";var WYM_JQUERY_PATH="{Wym_Jquery_Path}";var WYM_TOOLS="{Wym_Tools}";var WYM_TOOLS_ITEMS="{Wym_Tools_Items}";var WYM_TOOL_NAME="{Wym_Tool_Name}";var WYM_TOOL_TITLE="{Wym_Tool_Title}";var WYM_TOOL_CLASS="{Wym_Tool_Class}";var WYM_CLASSES="{Wym_Classes}";var WYM_CLASSES_ITEMS="{Wym_Classes_Items}";var WYM_CLASS_NAME="{Wym_Class_Name}";var WYM_CLASS_TITLE="{Wym_Class_Title}";var WYM_CONTAINERS="{Wym_Containers}";var WYM_CONTAINERS_ITEMS="{Wym_Containers_Items}";var WYM_CONTAINER_NAME="{Wym_Container_Name}";var WYM_CONTAINER_TITLE="{Wym_Containers_Title}";var WYM_CONTAINER_CLASS="{Wym_Container_Class}";var WYM_HTML="{Wym_Html}";var WYM_IFRAME="{Wym_Iframe}";var WYM_STATUS="{Wym_Status}";var WYM_DIALOG_TITLE="{Wym_Dialog_Title}";var WYM_DIALOG_BODY="{Wym_Dialog_Body}";var WYM_BODY="body";var WYM_STRING="string";var WYM_P="p";var WYM_H1="h1";var WYM_H2="h2";var WYM_H3="h3";var WYM_H4="h4";var WYM_H5="h5";var WYM_H6="h6";var WYM_PRE="pre";var WYM_BLOCKQUOTE="blockquote";var WYM_TD="td";var WYM_TH="th";var WYM_A="a";var WYM_BR="br";var WYM_IMG="img";var WYM_TABLE="table";var WYM_UL="ul";var WYM_OL="ol";var WYM_LI="li";var WYM_CLASS="class";var WYM_HREF="href";var WYM_SRC="src";var WYM_TITLE="title";var WYM_ALT="alt";var WYM_DIALOG_LINK="Link";var WYM_DIALOG_IMAGE="Image";var WYM_DIALOG_TABLE="Table";var WYM_DIALOG_PASTE="Paste_From_Word";var WYM_BOLD="Bold";var WYM_ITALIC="Italic";var WYM_CREATE_LINK="CreateLink";var WYM_INSERT_IMAGE="InsertImage";var WYM_INSERT_TABLE="InsertTable";var WYM_PASTE="Paste";var WYM_INDENT="Indent";var WYM_OUTDENT="Outdent";var WYM_TOGGLE_HTML="ToggleHtml";var WYM_FORMAT_BLOCK="FormatBlock";var WYM_PREVIEW="Preview";var WYM_DEFAULT_SKIN="default";var WYM_MAIN_CONTAINERS=new Array(WYM_P,WYM_H1,WYM_H2,WYM_H3,WYM_H4,WYM_H5,WYM_H6,WYM_PRE,WYM_BLOCKQUOTE);var WYM_BLOCKS=new Array("address","blockquote","div","dl","fieldset","form","h1","h2","h3","h4","h5","h6","hr","noscript","ol","p","pre","table","ul","dd","dt","li","tbody","td","tfoot","th","thead","tr");var WYM_KEY={BACKSPACE:8,ENTER:13,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,CURSOR:new Array(37,38,39,40),DELETE:46};var WYM_NODE={ELEMENT:1,ATTRIBUTE:2,TEXT:3};jQuery.fn.wymeditor=function(options){options=jQuery.extend({html:"",basePath:false,cssPath:false,iframeBasePath:false,jQueryPath:false,styles:false,stylesheet:false,lang:"en",boxHtml:"
"+"
"+WYM_TOOLS+"
"+"
"+"
"+WYM_CONTAINERS+WYM_CLASSES+"
"+"
"+WYM_HTML+WYM_IFRAME+WYM_STATUS+"
"+"
"+"
"+"
",iframeHtml:"
"+""+"
",editorStyles:[],toolsHtml:"
"+"

{Tools}

"+""+"
",toolsItemHtml:"
  • "+WYM_TOOL_TITLE+"
  • ",toolsItems:[{'name':'Bold','title':'Strong','css':'wym_tools_strong'},{'name':'Italic','title':'Emphasis','css':'wym_tools_emphasis'},{'name':'Superscript','title':'Superscript','css':'wym_tools_superscript'},{'name':'Subscript','title':'Subscript','css':'wym_tools_subscript'},{'name':'InsertOrderedList','title':'Ordered_List','css':'wym_tools_ordered_list'},{'name':'InsertUnorderedList','title':'Unordered_List','css':'wym_tools_unordered_list'},{'name':'Indent','title':'Indent','css':'wym_tools_indent'},{'name':'Outdent','title':'Outdent','css':'wym_tools_outdent'},{'name':'Undo','title':'Undo','css':'wym_tools_undo'},{'name':'Redo','title':'Redo','css':'wym_tools_redo'},{'name':'CreateLink','title':'Link','css':'wym_tools_link'},{'name':'Unlink','title':'Unlink','css':'wym_tools_unlink'},{'name':'InsertImage','title':'Image','css':'wym_tools_image'},{'name':'InsertTable','title':'Table','css':'wym_tools_table'},{'name':'Paste','title':'Paste_From_Word','css':'wym_tools_paste'},{'name':'ToggleHtml','title':'HTML','css':'wym_tools_html'},{'name':'Preview','title':'Preview','css':'wym_tools_preview'}],containersHtml:"
    "+"

    {Containers}

    "+""+"
    ",containersItemHtml:"
  • "+""+WYM_CONTAINER_TITLE+"
  • ",containersItems:[{'name':'P','title':'Paragraph','css':'wym_containers_p'},{'name':'H1','title':'Heading_1','css':'wym_containers_h1'},{'name':'H2','title':'Heading_2','css':'wym_containers_h2'},{'name':'H3','title':'Heading_3','css':'wym_containers_h3'},{'name':'H4','title':'Heading_4','css':'wym_containers_h4'},{'name':'H5','title':'Heading_5','css':'wym_containers_h5'},{'name':'H6','title':'Heading_6','css':'wym_containers_h6'},{'name':'PRE','title':'Preformatted','css':'wym_containers_pre'},{'name':'BLOCKQUOTE','title':'Blockquote','css':'wym_containers_blockquote'},{'name':'TH','title':'Table_Header','css':'wym_containers_th'}],classesHtml:"
    "+"

    {Classes}

    ",classesItemHtml:"
  • "+WYM_CLASS_TITLE+"
  • ",classesItems:[],statusHtml:"
    "+"

    {Status}

    "+"
    ",htmlHtml:"
    "+"

    {Source_Code}

    "+""+"
    ",boxSelector:".wym_box",toolsSelector:".wym_tools",toolsListSelector:" ul",containersSelector:".wym_containers",classesSelector:".wym_classes",htmlSelector:".wym_html",iframeSelector:".wym_iframe iframe",statusSelector:".wym_status",toolSelector:".wym_tools a",containerSelector:".wym_containers a",classSelector:".wym_classes a",htmlValSelector:".wym_html_val",hrefSelector:".wym_href",srcSelector:".wym_src",titleSelector:".wym_title",altSelector:".wym_alt",textSelector:".wym_text",rowsSelector:".wym_rows",colsSelector:".wym_cols",captionSelector:".wym_caption",submitSelector:".wym_submit",cancelSelector:".wym_cancel",previewSelector:"",dialogLinkSelector:".wym_dialog_link",dialogImageSelector:".wym_dialog_image",dialogTableSelector:".wym_dialog_table",dialogPasteSelector:".wym_dialog_paste",dialogPreviewSelector:".wym_dialog_preview",updateSelector:".wymupdate",updateEvent:"click",dialogFeatures:"menubar=no,titlebar=no,toolbar=no,resizable=no"+",width=560,height=300,top=0,left=0",dialogHtml:""+""+""+""+WYM_DIALOG_TITLE+""+""+""+""+WYM_DIALOG_BODY+"",dialogLinkHtml:""+"
    "+"
    "+"{Link}"+"
    "+""+""+"
    "+"
    "+""+""+"
    "+"
    "+""+""+"
    "+"
    "+"
    "+"",dialogImageHtml:""+"
    "+"
    "+"{Image}"+"
    "+""+""+"
    "+"
    "+""+""+"
    "+"
    "+""+""+"
    "+"
    "+""+""+"
    "+"
    "+"
    "+"",dialogTableHtml:""+"
    "+"
    "+"{Table}"+"
    "+""+""+"
    "+"
    "+""+""+"
    "+"
    "+""+""+"
    "+"
    "+""+""+"
    "+"
    "+"
    "+"",dialogPasteHtml:""+"
    "+"
    "+"{Paste_From_Word}"+"
    "+""+"
    "+"
    "+""+""+"
    "+"
    "+"
    "+"",dialogPreviewHtml:"",dialogStyles:[],skin:WYM_DEFAULT_SKIN,stringDelimiterLeft:"{",stringDelimiterRight:"}",preInit:null,preBind:null,postInit:null,preInitDialog:null,postInitDialog:null},options);return this.each(function(i){new Wymeditor(jQuery(this),i,options)})};jQuery.extend({wymeditors:function(i){return(WYM_INSTANCES[i])},wymstrings:function(lang,sKey){return(WYM_STRINGS[lang][sKey])}});function Wymeditor(elem,index,options){WYM_INSTANCES[index]=this;this._element=elem;this._index=index;this._options=options;this._html=jQuery(elem).val();if(this._options.html)this._html=this._options.html;this._options.basePath=this._options.basePath||this.computeBasePath();this._options.cssPath=this._options.cssPath||this.computeCssPath();this._options.iframeBasePath=this._options.iframeBasePath||this._options.basePath+WYM_IFRAME_DEFAULT;this._options.jQueryPath=this._options.jQueryPath||this.computeJqueryPath();this.init()};Wymeditor.prototype.init=function(){if(jQuery.browser.msie){var WymClass=new WymClassExplorer(this)}else if(jQuery.browser.mozilla){var WymClass=new WymClassMozilla(this)}else if(jQuery.browser.opera){var WymClass=new WymClassOpera(this)}else if(jQuery.browser.safari){var WymClass=new WymClassOpera(this)}if(WymClass){if(jQuery.isFunction(this._options.preInit))this._options.preInit(this);this.loadXhtmlParser(WymClass);if(this._options.styles||this._options.stylesheet){this.configureEditorUsingRawCss()}this.helper=new XmlHelper();jQuery.extend(this,WymClass);this._box=jQuery(this._element).hide().after(this._options.boxHtml).next();var iframeHtml=this._options.iframeHtml;iframeHtml=iframeHtml.replaceAll(WYM_INDEX,this._index).replaceAll(WYM_IFRAME_BASE_PATH,this._options.iframeBasePath);var boxHtml=jQuery(this._box).html();boxHtml=boxHtml.replaceAll(WYM_TOOLS,this._options.toolsHtml);boxHtml=boxHtml.replaceAll(WYM_CONTAINERS,this._options.containersHtml);boxHtml=boxHtml.replaceAll(WYM_CLASSES,this._options.classesHtml);boxHtml=boxHtml.replaceAll(WYM_HTML,this._options.htmlHtml);boxHtml=boxHtml.replaceAll(WYM_IFRAME,iframeHtml);boxHtml=boxHtml.replaceAll(WYM_STATUS,this._options.statusHtml);var aTools=eval(this._options.toolsItems);var sTools="";for(var i=0;i0)firstNode=nodes.item(0);for(var x=0;x=0;x--){sTmp=aP[x];sTmp=sTmp.replace(rExp,"
    ");jQuery(container).after("

    "+sTmp+"

    ")}}else{for(x=0;x");jQuery(this._doc.body).append("

    "+sTmp+"

    ")}}};Wymeditor.prototype.addCssRules=function(doc,aCss){var styles=doc.styleSheets[0];if(styles){for(var i=0;i >");jQuery(this._box).find("div.wym_area_right ul").parents("div.wym_area_right").show().parents(this._options.boxSelector).find("div.wym_area_main").css({"margin-right":"155px"});jQuery(this._box).find("div.wym_area_left ul").parents("div.wym_area_left").show().parents(this._options.boxSelector).find("div.wym_area_main").css({"margin-left":"155px"});jQuery(this._box).find(".wym_section").hover(function(){jQuery(this).addClass("hover")},function(){jQuery(this).removeClass("hover")});break}};function WYM_INIT_DIALOG(index){var wym=window.opener.WYM_INSTANCES[index];var doc=window.document;var selected=wym.selected();var sStamp=wym.uniqueStamp();if(!selected&&wym._selected_image){selected=jQuery(wym._selected_image).parentsOrSelf(WYM_A)}if(jQuery.isFunction(wym._options.preInitDialog))wym._options.preInitDialog(wym,window);var styles=doc.styleSheets[0];var aCss=eval(wym._options.dialogStyles);wym.addCssRules(doc,aCss);if(selected){jQuery(wym._options.hrefSelector).val(jQuery(selected).attr(WYM_HREF));jQuery(wym._options.srcSelector).val(jQuery(selected).attr(WYM_SRC));jQuery(wym._options.titleSelector).val(jQuery(selected).attr(WYM_TITLE));jQuery(wym._options.altSelector).val(jQuery(selected).attr(WYM_ALT))}if(wym._selected_image){jQuery(wym._options.dialogImageSelector+" "+wym._options.srcSelector).val(jQuery(wym._selected_image).attr(WYM_SRC));jQuery(wym._options.dialogImageSelector+" "+wym._options.titleSelector).val(jQuery(wym._selected_image).attr(WYM_TITLE));jQuery(wym._options.dialogImageSelector+" "+wym._options.altSelector).val(jQuery(wym._selected_image).attr(WYM_ALT))}jQuery(wym._options.dialogLinkSelector+" "+wym._options.submitSelector).click(function(){var sUrl=jQuery(wym._options.hrefSelector).val();if(sUrl.length>0){wym._exec(WYM_CREATE_LINK,sStamp);var link=null;var nodes=wym._doc.body.getElementsByTagName(WYM_A);for(var i=0;i0){wym._exec(WYM_INSERT_IMAGE,sStamp);var image=null;var nodes=wym._doc.body.getElementsByTagName(WYM_IMG);for(var i=0;i0&&iCols>0){var table=wym._doc.createElement(WYM_TABLE);var newRow=null;var newCol=null;var sCaption=jQuery(wym._options.captionSelector).val();var newCaption=table.createCaption();newCaption.innerHTML=sCaption;for(x=0;x]*)>/gi,"").replace(/<\/em>/gi,"").replace(/]*)>/gi,"").replace(/<\/strong>/gi,"");jQuery(this._doc.body).html(html);this.enableDesignMode()}else return(jQuery(this._doc.body).html())};WymClassMozilla.prototype._exec=function(cmd,param){if(!this.selected())return(false);switch(cmd){case WYM_INDENT:case WYM_OUTDENT:var focusNode=this.selected();var sel=this._iframe.contentWindow.getSelection();var anchorNode=sel.anchorNode;if(anchorNode.nodeName=="#text")anchorNode=anchorNode.parentNode;focusNode=this.findUp(focusNode,WYM_BLOCKS);anchorNode=this.findUp(anchorNode,WYM_BLOCKS);if(focusNode&&focusNode==anchorNode&&focusNode.tagName.toLowerCase()==WYM_LI){var ancestor=focusNode.parentNode.parentNode;if(focusNode.parentNode.childNodes.length>1||ancestor.tagName.toLowerCase()==WYM_OL||ancestor.tagName.toLowerCase()==WYM_UL)this._doc.execCommand(cmd,'',null)}break;default:if(param)this._doc.execCommand(cmd,'',param);else this._doc.execCommand(cmd,'',null)}var container=this.selected();if(container.tagName.toLowerCase()==WYM_BODY)this._exec(WYM_FORMAT_BLOCK,WYM_P);this.listen()};WymClassMozilla.prototype.selected=function(){var sel=this._iframe.contentWindow.getSelection();var node=sel.focusNode;if(node){if(node.nodeName=="#text")return(node.parentNode);else return(node)}else return(null)};WymClassMozilla.prototype.addCssRule=function(styles,oCss){styles.insertRule(oCss.name+" {"+oCss.css+"}",styles.cssRules.length)};WymClassMozilla.prototype.keydown=function(evt){var wym=WYM_INSTANCES[this.title];if(evt.ctrlKey){if(evt.keyCode==66){wym._exec(WYM_BOLD);return false}if(evt.keyCode==73){wym._exec(WYM_ITALIC);return false}}};WymClassMozilla.prototype.keyup=function(evt){var wym=WYM_INSTANCES[this.title];wym._selected_image=null;if(evt.keyCode==13&&!evt.shiftKey){jQuery(wym._doc.body).children(WYM_BR).remove()}else if(evt.keyCode!=8&&evt.keyCode!=17&&evt.keyCode!=46&&evt.keyCode!=224&&!evt.metaKey&&!evt.ctrlKey){var container=wym.selected();var name=container.tagName.toLowerCase();if(name=="strong"||name=="b"||name=="em"||name=="i"||name=="sub"||name=="sup"||name=="a")name=container.parentNode.tagName.toLowerCase();if(name==WYM_BODY)wym._exec(WYM_FORMAT_BLOCK,WYM_P)}};WymClassMozilla.prototype.enableDesignMode=function(){if(this.designMode=="off"){try{this.designMode="on";this.execCommand("styleWithCSS",'',false)}catch(e){}}};WymClassMozilla.prototype.setFocusToNode=function(node){var range=document.createRange();range.selectNode(node);var selected=this._iframe.contentWindow.getSelection();selected.addRange(range);selected.collapse(node,node.childNodes.length);this._iframe.contentWindow.focus()};WymClassMozilla.prototype.openBlockTag=function(tag,attributes){var attributes=this.validator.getValidTagAttributes(tag,attributes);if(tag=='span'&&attributes.style){var new_tag=this.getTagForStyle(attributes.style);if(new_tag){this._tag_stack.pop();var tag=new_tag;this._tag_stack.push(new_tag);attributes.style=''}else{return}}if(tag!='li'&&(tag=='ul'||tag=='ol')&&this.last_tag&&!this.last_tag_opened&&this.last_tag=='li'){this.output=this.output.replace(/<\/li>$/,'');this.insertContentAfterClosingTag(tag,'')}this.output+=this.helper.tag(tag,attributes,true)};WymClassMozilla.prototype.closeBlockTag=function(tag){this.output=this.output.replace(/
    $/,'')+this._getClosingTagContent('before',tag)+""+this._getClosingTagContent('after',tag)};WymClassMozilla.prototype.getTagForStyle=function(style){if(/bold/.test(style))return'strong';if(/italic/.test(style))return'em';if(/sub/.test(style))return'sub';if(/sub/.test(style))return'super';return false};function WymClassOpera(wym){this._wym=wym;this._class="class";this._newLine="\r\n"};WymClassOpera.prototype.initIframe=function(iframe){this._iframe=iframe;this._doc=iframe.contentWindow.document;var styles=this._doc.styleSheets[0];var aCss=eval(this._options.editorStyles);this.addCssRules(this._doc,aCss);this._doc.title=this._wym._index;this._doc.designMode="on";this.html(this._wym._html);if(jQuery.isFunction(this._options.preBind))this._options.preBind(this);jQuery(this._box).find(this._options.toolSelector+'[@name='+WYM_INDENT+']').hide();jQuery(this._box).find(this._options.toolSelector+'[@name='+WYM_OUTDENT+']').hide();this._wym.bindEvents();jQuery(this._doc).bind("keyup",this.keyup);if(jQuery.isFunction(this._options.postInit))this._options.postInit(this);this.listen()};WymClassOpera.prototype._exec=function(cmd,param){switch(cmd){case WYM_INDENT:case WYM_OUTDENT:this.status("Unsupported feature.");break;default:if(param)this._doc.execCommand(cmd,false,param);else this._doc.execCommand(cmd);break}this.listen()};WymClassOpera.prototype.selected=function(){var sel=this._iframe.contentWindow.getSelection();var node=sel.focusNode;if(node){if(node.nodeName=="#text")return(node.parentNode);else return(node)}else return(null)};WymClassOpera.prototype.addCssRule=function(styles,oCss){styles.insertRule(oCss.name+" {"+oCss.css+"}",styles.cssRules.length)};WymClassOpera.prototype.keyup=function(evt){var wym=WYM_INSTANCES[this.title];wym._selected_image=null};WymClassOpera.prototype.setFocusToNode=function(node){}; \ No newline at end of file