Index: openacs-4/packages/xowiki/www/resources/wymeditor/MIT-license.txt
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/www/resources/wymeditor/MIT-license.txt,v
diff -u -r1.2 -r1.3
--- openacs-4/packages/xowiki/www/resources/wymeditor/MIT-license.txt 29 May 2008 19:13:43 -0000 1.2
+++ openacs-4/packages/xowiki/www/resources/wymeditor/MIT-license.txt 1 Jun 2009 07:20:20 -0000 1.3
@@ -1,4 +1,4 @@
-Copyright (c) 2008 Jean-Francois Hovinne, http://www.wymeditor.org/
+Copyright (c) 2005 - 2009 Jean-Francois Hovinne, http://www.wymeditor.org/
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
Index: openacs-4/packages/xowiki/www/resources/wymeditor/jquery.wymeditor.js
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/www/resources/wymeditor/jquery.wymeditor.js,v
diff -u -r1.6 -r1.7
--- openacs-4/packages/xowiki/www/resources/wymeditor/jquery.wymeditor.js 21 Nov 2008 23:09:01 -0000 1.6
+++ openacs-4/packages/xowiki/www/resources/wymeditor/jquery.wymeditor.js 1 Jun 2009 07:20:21 -0000 1.7
@@ -1,6 +1,8 @@
-/*
+/**
+ * @version 0.5-rc1
+ *
* WYMeditor : what you see is What You Mean web-based editor
- * Copyright (c) 2008 Jean-Francois Hovinne, http://www.wymeditor.org/
+ * Copyright (c) 2005 - 2009 Jean-Francois Hovinne, http://www.wymeditor.org/
* Dual licensed under the MIT (MIT-license.txt)
* and GPL (GPL-license.txt) licenses.
*
@@ -118,7 +120,7 @@
*/
- VERSION : "0.5-b2",
+ VERSION : "0.5-rc1",
INSTANCES : [],
STRINGS : [],
SKINS : [],
@@ -131,7 +133,7 @@
SKINS_DEFAULT_PATH : "skins/",
SKINS_DEFAULT_CSS : "skin.css",
SKINS_DEFAULT_JS : "skin.js",
- LANG_DEFAULT_PATH : "lang/",
+ LANG_DEFAULT_PATH : "lang/",
IFRAME_BASE_PATH : "{Wym_Iframe_Base_Path}",
IFRAME_DEFAULT : "iframe/default/",
JQUERY_PATH : "{Wym_Jquery_Path}",
@@ -198,10 +200,9 @@
TOGGLE_HTML : "ToggleHtml",
FORMAT_BLOCK : "FormatBlock",
PREVIEW : "Preview",
-
- UNLINK : "Unlink",
- INSERT_UNORDEREDLIST : "InsertUnorderedList",
- INSERT_ORDEREDLIST : "InsertOrderedList",
+ UNLINK : "Unlink",
+ INSERT_UNORDEREDLIST: "InsertUnorderedList",
+ INSERT_ORDEREDLIST : "InsertOrderedList",
MAIN_CONTAINERS : new Array("p","h1","h2","h3","h4","h5","h6","pre","blockquote"),
@@ -514,6 +515,8 @@
dialogFeatures: "menubar=no,titlebar=no,toolbar=no,resizable=no"
+ ",width=560,height=300,top=0,left=0",
+ dialogFeaturesPreview: "menubar=no,titlebar=no,toolbar=no,resizable=no"
+ + ",scrollbars=yes,width=560,height=300,top=0,left=0",
dialogHtml: ""
@@ -712,6 +715,7 @@
}
else if (jQuery.browser.safari) {
var WymClass = new WYMeditor.WymClassSafari(this);
+ var WymClass = new WymClassOpera(this);
}
if(WymClass) {
@@ -734,12 +738,14 @@
for (var prop in WymClass) { this[prop] = WymClass[prop]; }
//load wymbox
- this._box = jQuery(this._element).hide().after(this._options.boxHtml).next();
+ this._box = jQuery(this._element).hide().after(this._options.boxHtml).next().addClass('wym_box_' + this._index);
- //store the instance index in the wymbox element
+ //store the instance index in wymbox and element replaced by editor instance
//but keep it compatible with jQuery < 1.2.3, see #122
- if( jQuery.isFunction( jQuery.fn.data ) )
+ if( jQuery.isFunction( jQuery.fn.data ) ) {
jQuery.data(this._box.get(0), WYMeditor.WYM_INDEX, this._index);
+ jQuery.data(this._element.get(0), WYMeditor.WYM_INDEX, this._index);
+ }
var h = WYMeditor.Helper;
@@ -833,7 +839,8 @@
//handle click event on tools buttons
jQuery(this._box).find(this._options.toolSelector).click(function() {
- wym.exec(jQuery(this).attr(WYMeditor.NAME));
+ wym._iframe.contentWindow.focus(); //See #154
+ wym.exec(jQuery(this).attr(WYMeditor.NAME));
return(false);
});
@@ -844,10 +851,12 @@
});
//handle keyup event on html value: set the editor value
- jQuery(this._box).find(this._options.htmlValSelector).keyup(function() {
- jQuery(wym._doc.body).html(jQuery(this).val());
- });
-
+ //handle focus/blur events to check if the element has focus, see #147
+ jQuery(this._box).find(this._options.htmlValSelector)
+ .keyup(function() { jQuery(wym._doc.body).html(jQuery(this).val());})
+ .focus(function() { jQuery(this).toggleClass('hasfocus'); })
+ .blur(function() { jQuery(this).toggleClass('hasfocus'); });
+
//handle click event on classes buttons
jQuery(this._box).find(this._options.classSelector).click(function() {
@@ -860,6 +869,7 @@
var jqexpr = oClass.expr;
wym.toggleClass(sName, jqexpr);
}
+ wym._iframe.contentWindow.focus(); //See #154
return(false);
});
@@ -935,7 +945,7 @@
break;
case WYMeditor.PREVIEW:
- this.dialog(WYMeditor.PREVIEW);
+ this.dialog(WYMeditor.PREVIEW, this._options.dialogFeaturesPreview);
break;
default:
@@ -1137,18 +1147,16 @@
var html = this.xhtml();
jQuery(this._element).val(html);
- jQuery(this._box).find(this._options.htmlValSelector).val(html);
+ jQuery(this._box).find(this._options.htmlValSelector).not('.hasfocus').val(html); //#147
};
/* @name dialog
* @description Opens a dialog box
*/
-WYMeditor.editor.prototype.dialog = function( dialogType, bodyHtml ) {
+WYMeditor.editor.prototype.dialog = function( dialogType, dialogFeatures, bodyHtml ) {
- var wDialog = window.open(
- '',
- 'dialog',
- this._wym._options.dialogFeatures);
+ var features = dialogFeatures || this._wym._options.dialogFeatures;
+ var wDialog = window.open('', 'dialog', features);
if(wDialog) {
@@ -1278,19 +1286,19 @@
WYMeditor.editor.prototype.computeBasePath = function() {
return jQuery(jQuery.grep(jQuery('script'), function(s){
- return (s.src && s.src.match(/jquery\.wymeditor(\.pack){0,1}\.js(\?.*)?$/ ))
- })).attr('src').replace(/jquery\.wymeditor(\.pack){0,1}\.js(\?.*)?$/, '');
+ return (s.src && s.src.match(/jquery\.wymeditor(\.pack|\.min|\.packed)?\.js(\?.*)?$/ ))
+ })).attr('src').replace(/jquery\.wymeditor(\.pack|\.min|\.packed)?\.js(\?.*)?$/, '');
};
WYMeditor.editor.prototype.computeWymPath = function() {
return jQuery(jQuery.grep(jQuery('script'), function(s){
- return (s.src && s.src.match(/jquery\.wymeditor(\.pack){0,1}\.js(\?.*)?$/ ))
+ return (s.src && s.src.match(/jquery\.wymeditor(\.pack|\.min|\.packed)?\.js(\?.*)?$/ ))
})).attr('src');
};
WYMeditor.editor.prototype.computeJqueryPath = function() {
return jQuery(jQuery.grep(jQuery('script'), function(s){
- return (s.src && s.src.match(/jquery(-(.*)){0,1}(\.pack){0,1}\.js(\?.*)?$/ ))
+ return (s.src && s.src.match(/jquery(-(.*)){0,1}(\.pack|\.min|\.packed)?\.js(\?.*)?$/ ))
})).attr('src');
};
@@ -1468,7 +1476,7 @@
wym._exec(WYMeditor.CREATE_LINK, sStamp);
- jQuery("a[@href=" + sStamp + "]", wym._doc.body)
+ jQuery("a[href=" + sStamp + "]", wym._doc.body)
.attr(WYMeditor.HREF, sUrl)
.attr(WYMeditor.TITLE, jQuery(wym._options.titleSelector).val());
@@ -1484,7 +1492,7 @@
wym._exec(WYMeditor.INSERT_IMAGE, sStamp);
- jQuery("img[@src=" + sStamp + "]", wym._doc.body)
+ jQuery("img[src$=" + sStamp + "]", wym._doc.body)
.attr(WYMeditor.SRC, sUrl)
.attr(WYMeditor.TITLE, jQuery(wym._options.titleSelector).val())
.attr(WYMeditor.ALT, jQuery(wym._options.altSelector).val());
@@ -3409,13 +3417,14 @@
xhtml = this.replaceNamedEntities(xhtml);
xhtml = this.joinRepeatedEntities(xhtml);
xhtml = this.removeEmptyTags(xhtml);
+ xhtml = this.removeBrInPre(xhtml);
return xhtml;
};
WYMeditor.XhtmlSaxListener.prototype.replaceNamedEntities = function(xhtml)
{
for (var entity in this.entities) {
- xhtml = xhtml.replace(entity, this.entities[entity]);
+ xhtml = xhtml.replace(new RegExp(entity, 'g'), this.entities[entity]);
}
return xhtml;
};
@@ -3429,9 +3438,20 @@
WYMeditor.XhtmlSaxListener.prototype.removeEmptyTags = function(xhtml)
{
- return xhtml.replace(new RegExp('<('+this.block_tags.join("|").replace(/\|td/,'')+')>(
| | |\\s)*<\/\\1>' ,'g'),'');
+ return xhtml.replace(new RegExp('<('+this.block_tags.join("|").replace(/\|td/,'').replace(/\|th/, '')+')>(
| | |\\s)*<\/\\1>' ,'g'),'');
};
+WYMeditor.XhtmlSaxListener.prototype.removeBrInPre = function(xhtml)
+{
+ var matches = xhtml.match(new RegExp('
]*>(.*?)<\/pre>','gmi')); + if(matches) { + for(var i=0; i', 'g'), String.fromCharCode(13,10))); + } + } + return xhtml; +}; + WYMeditor.XhtmlSaxListener.prototype.getResult = function() { return this.output; @@ -3580,16 +3600,16 @@ this.addExitPattern("/\\\x2a[<\/\\s]*WYMeditor[>\\s]*\\\x2a/", 'WymCss'); } - this.addSpecialPattern("\\\x2e[a-z-_0-9]+[\\sa-z1-6]*", 'WymCss', 'WymCssStyleDeclaration'); + this.addSpecialPattern("[\\sa-z1-6]*\\\x2e[a-z-_0-9]+", 'WymCss', 'WymCssStyleDeclaration'); this.addEntryPattern("/\\\x2a", 'WymCss', 'WymCssComment'); this.addExitPattern("\\\x2a/", 'WymCssComment'); this.addEntryPattern("\x7b", 'WymCss', 'WymCssStyle'); this.addExitPattern("\x7d", 'WymCssStyle'); - this.addEntryPattern("/\\\x2a", 'WymCssStyle', 'WymCssFeddbackStyle'); - this.addExitPattern("\\\x2a/", 'WymCssFeddbackStyle'); + this.addEntryPattern("/\\\x2a", 'WymCssStyle', 'WymCssFeedbackStyle'); + this.addExitPattern("\\\x2a/", 'WymCssFeedbackStyle'); return this; }; @@ -3653,7 +3673,7 @@ return true; }; -WYMeditor.WymCssParser.prototype.WymCssFeddbackStyle = function(match, status) +WYMeditor.WymCssParser.prototype.WymCssFeedbackStyle = function(match, status) { if(status == WYMeditor.LEXER_UNMATCHED){ this._current_item[this._current_element].feedback_style = match.replace(/^([\s\/\*]*)|([\s\/\*]*)$/gm,''); @@ -3666,10 +3686,10 @@ match = match.replace(/^([\s\.]*)|([\s\.*]*)$/gm, ''); var tag = ''; - if(match.indexOf(' ') > 0){ - var parts = match.split(' '); - this._current_element = parts[0]; - var tag = parts[1]; + if(match.indexOf('.') > 0){ + var parts = match.split('.'); + this._current_element = parts[1]; + var tag = parts[0]; }else{ this._current_element = match; } @@ -3806,143 +3826,149 @@ }; -/* - * WYMeditor : what you see is What You Mean web-based editor - * Copyright (c) 2008 Jean-Francois Hovinne, http://www.wymeditor.org/ - * Dual licensed under the MIT (MIT-license.txt) - * and GPL (GPL-license.txt) licenses. - * - * For further information visit: - * http://www.wymeditor.org/ - * - * File Name: - * jquery.wymeditor.explorer.js - * MSIE specific class and functions. - * See the documentation for more info. - * - * File Authors: - * Jean-Francois Hovinne (jf.hovinne a-t wymeditor dotorg) - * Bermi Ferrer (wymeditor a-t bermi dotorg) +/* + * WYMeditor : what you see is What You Mean web-based editor + * Copyright (c) 2005 - 2009 Jean-Francois Hovinne, http://www.wymeditor.org/ + * Dual licensed under the MIT (MIT-license.txt) + * and GPL (GPL-license.txt) licenses. + * + * For further information visit: + * http://www.wymeditor.org/ + * + * File Name: + * jquery.wymeditor.explorer.js + * MSIE specific class and functions. + * See the documentation for more info. + * + * File Authors: + * Jean-Francois Hovinne (jf.hovinne a-t wymeditor dotorg) + * Bermi Ferrer (wymeditor a-t bermi dotorg) * Frédéric Palluel-Lafleur (fpalluel a-t gmail dotcom) - * Jonatan Lundin (jonatan.lundin _at_ gmail.com) - */ - -WYMeditor.WymClassExplorer = function(wym) { - - this._wym = wym; - this._class = "className"; - this._newLine = "\r\n"; -}; - -WYMeditor.WymClassExplorer.prototype.initIframe = function(iframe) { - - //This function is executed twice, though it is called once! - //But MSIE needs that, otherwise designMode won't work. - //Weird. - - this._iframe = iframe; - this._doc = iframe.contentWindow.document; - - //add css rules from options - var styles = this._doc.styleSheets[0]; - var aCss = eval(this._options.editorStyles); - - this.addCssRules(this._doc, aCss); - + * Jonatan Lundin (jonatan.lundin _at_ gmail.com) + */ + +WYMeditor.WymClassExplorer = function(wym) { + + this._wym = wym; + this._class = "className"; + this._newLine = "\r\n"; + +}; + +WYMeditor.WymClassExplorer.prototype.initIframe = function(iframe) { + + //This function is executed twice, though it is called once! + //But MSIE needs that, otherwise designMode won't work. + //Weird. + + this._iframe = iframe; + this._doc = iframe.contentWindow.document; + + //add css rules from options + var styles = this._doc.styleSheets[0]; + var aCss = eval(this._options.editorStyles); + + this.addCssRules(this._doc, aCss); + this._doc.title = this._wym._index; //set the text direction - jQuery('html', this._doc).attr('dir', this._options.direction); - - //init html value - jQuery(this._doc.body).html(this._wym._html); - - //handle events - var wym = this; - - this._doc.body.onfocus = function() - {wym._doc.designMode = "on"; wym._doc = iframe.contentWindow.document;}; - this._doc.onbeforedeactivate = function() {wym.saveCaret();}; - this._doc.onkeyup = function() { - wym.saveCaret(); - wym.keyup(); - }; - this._doc.onclick = function() {wym.saveCaret();}; - - this._doc.body.onbeforepaste = function() { - wym._iframe.contentWindow.event.returnValue = false; - }; - - this._doc.body.onpaste = function() { - wym._iframe.contentWindow.event.returnValue = false; - wym.paste(window.clipboardData.getData("Text")); - }; - - //callback can't be executed twice, so we check - if(this._initialized) { - - //pre-bind functions - if(jQuery.isFunction(this._options.preBind)) this._options.preBind(this); - - //bind external events - this._wym.bindEvents(); - - //post-init functions - if(jQuery.isFunction(this._options.postInit)) this._options.postInit(this); - - //add event listeners to doc elements, e.g. images - this.listen(); - } - - this._initialized = true; - - //init designMode - this._doc.designMode="on"; - try{ - // (bermi's note) noticed when running unit tests on IE6 - // Is this really needed, it trigger an unexisting property on IE6 - this._doc = iframe.contentWindow.document; - }catch(e){} -}; - -WYMeditor.WymClassExplorer.prototype._exec = function(cmd,param) { - - switch(cmd) { - - case WYMeditor.INDENT: case WYMeditor.OUTDENT: - - var container = this.findUp(this.container(), WYMeditor.LI); - if(container) - this._doc.execCommand(cmd); - break; - default: - if(param) this._doc.execCommand(cmd,false,param); - else this._doc.execCommand(cmd); - break; - } - - this.listen(); -}; - -WYMeditor.WymClassExplorer.prototype.selected = function() { - - var caretPos = this._iframe.contentWindow.document.caretPos; - if(caretPos!=null) { - if(caretPos.parentElement!=undefined) - return(caretPos.parentElement()); - } -}; - -WYMeditor.WymClassExplorer.prototype.saveCaret = function() { - - this._doc.caretPos = this._doc.selection.createRange(); -}; - -WYMeditor.WymClassExplorer.prototype.addCssRule = function(styles, oCss) { - - styles.addRule(oCss.name, oCss.css); + jQuery('html', this._doc).attr('dir', this._options.direction); + + //init html value + jQuery(this._doc.body).html(this._wym._html); + + //handle events + var wym = this; + + this._doc.body.onfocus = function() + {wym._doc.designMode = "on"; wym._doc = iframe.contentWindow.document;}; + this._doc.onbeforedeactivate = function() {wym.saveCaret();}; + this._doc.onkeyup = function() { + wym.saveCaret(); + wym.keyup(); + }; + this._doc.onclick = function() {wym.saveCaret();}; + + this._doc.body.onbeforepaste = function() { + wym._iframe.contentWindow.event.returnValue = false; + }; + + this._doc.body.onpaste = function() { + wym._iframe.contentWindow.event.returnValue = false; + wym.paste(window.clipboardData.getData("Text")); + }; + + //callback can't be executed twice, so we check + if(this._initialized) { + + //pre-bind functions + if(jQuery.isFunction(this._options.preBind)) this._options.preBind(this); + + //bind external events + this._wym.bindEvents(); + + //post-init functions + if(jQuery.isFunction(this._options.postInit)) this._options.postInit(this); + + //add event listeners to doc elements, e.g. images + this.listen(); + } + + this._initialized = true; + + //init designMode + this._doc.designMode="on"; + try{ + // (bermi's note) noticed when running unit tests on IE6 + // Is this really needed, it trigger an unexisting property on IE6 + this._doc = iframe.contentWindow.document; + }catch(e){} }; +WYMeditor.WymClassExplorer.prototype._exec = function(cmd,param) { + + switch(cmd) { + + case WYMeditor.INDENT: case WYMeditor.OUTDENT: + + var container = this.findUp(this.container(), WYMeditor.LI); + if(container) { + var ancestor = container.parentNode.parentNode; + if(container.parentNode.childNodes.length>1 + || ancestor.tagName.toLowerCase() == WYMeditor.OL + || ancestor.tagName.toLowerCase() == WYMeditor.UL) + this._doc.execCommand(cmd); + } + break; + default: + if(param) this._doc.execCommand(cmd,false,param); + else this._doc.execCommand(cmd); + break; + } + + this.listen(); +}; + +WYMeditor.WymClassExplorer.prototype.selected = function() { + + var caretPos = this._iframe.contentWindow.document.caretPos; + if(caretPos!=null) { + if(caretPos.parentElement!=undefined) + return(caretPos.parentElement()); + } +}; + +WYMeditor.WymClassExplorer.prototype.saveCaret = function() { + + this._doc.caretPos = this._doc.selection.createRange(); +}; + +WYMeditor.WymClassExplorer.prototype.addCssRule = function(styles, oCss) { + + styles.addRule(oCss.name, oCss.css); +}; + WYMeditor.WymClassExplorer.prototype.insert = function(html) { // Get the current selection @@ -3988,25 +4014,25 @@ range.pasteHTML( text ); } catch (e) { } } -}; - -//keyup handler -WYMeditor.WymClassExplorer.prototype.keyup = function() { - this._selected_image = null; -}; - -WYMeditor.WymClassExplorer.prototype.setFocusToNode = function(node) { - var range = this._doc.selection.createRange(); - range.moveToElementText(node); - range.collapse(false); - range.move('character',-1); - range.select(); - node.focus(); -}; +}; +//keyup handler +WYMeditor.WymClassExplorer.prototype.keyup = function() { + this._selected_image = null; +}; + +WYMeditor.WymClassExplorer.prototype.setFocusToNode = function(node) { + var range = this._doc.selection.createRange(); + range.moveToElementText(node); + range.collapse(false); + range.move('character',-1); + range.select(); + node.focus(); +}; + /* * WYMeditor : what you see is What You Mean web-based editor - * Copyright (c) 2008 Jean-Francois Hovinne, http://www.wymeditor.org/ + * Copyright (c) 2005 - 2009 Jean-Francois Hovinne, http://www.wymeditor.org/ * Dual licensed under the MIT (MIT-license.txt) * and GPL (GPL-license.txt) licenses. * @@ -4089,11 +4115,11 @@ //replace em by i and strong by bold //(designMode issue) - html = html.replace(/]*)>/gi, "") + html = html.replace(/]*)>/gi, "") .replace(/<\/em>/gi, "") - .replace(/]*)>/gi, "") + .replace(/]*)>/gi, "") .replace(/<\/strong>/gi, ""); - + //update the html body jQuery(this._doc.body).html(html); @@ -4173,7 +4199,8 @@ //'this' is the doc var wym = WYMeditor.INSTANCES[this.title]; - + var container = null; + if(evt.ctrlKey){ if(evt.keyCode == 66){ //CTRL+b => STRONG @@ -4186,6 +4213,17 @@ return false; } } + + else if(evt.keyCode == 13) { + if(!evt.shiftKey){ + //fix PRE bug #73 + container = wym.selected(); + if(container && container.tagName.toLowerCase() == WYMeditor.PRE) { + evt.preventDefault(); + wym.insert(''); + } + } + } }; //keyup handler, mainly used for cleanups @@ -4202,11 +4240,6 @@ //RETURN key //cleanup
between paragraphs jQuery(wym._doc.body).children(WYMeditor.BR).remove(); - - //fix PRE bug #73 - container = wym.selected(); - if(container && container.tagName.toLowerCase() == WYMeditor.PRE) - wym._exec(WYMeditor.FORMAT_BLOCK, WYMeditor.P); //create P after PRE } else if(evt.keyCode != 8 @@ -4287,7 +4320,7 @@ /* * WYMeditor : what you see is What You Mean web-based editor - * Copyright (c) 2008 Jean-Francois Hovinne, http://www.wymeditor.org/ + * Copyright (c) 2005 - 2009 Jean-Francois Hovinne, http://www.wymeditor.org/ * Dual licensed under the MIT (MIT-license.txt) * and GPL (GPL-license.txt) licenses. * @@ -4413,7 +4446,7 @@ /* * WYMeditor : what you see is What You Mean web-based editor - * Copyright (c) 2008 Jean-Francois Hovinne, http://www.wymeditor.org/ + * Copyright (c) 2005 - 2009 Jean-Francois Hovinne, http://www.wymeditor.org/ * Dual licensed under the MIT (MIT-license.txt) * and GPL (GPL-license.txt) licenses. * @@ -4631,14 +4664,13 @@ } }; -//TODO WYMeditor.WymClassSafari.prototype.setFocusToNode = function(node) { - /*var range = document.createRange(); + var range = this._iframe.contentDocument.createRange(); range.selectNode(node); var selected = this._iframe.contentWindow.getSelection(); selected.addRange(range); selected.collapse(node, node.childNodes.length); - this._iframe.contentWindow.focus();*/ + this._iframe.contentWindow.focus(); }; WYMeditor.WymClassSafari.prototype.openBlockTag = function(tag, attributes) Index: openacs-4/packages/xowiki/www/resources/wymeditor/jquery.wymeditor.min.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/www/resources/wymeditor/jquery.wymeditor.min.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/xowiki/www/resources/wymeditor/jquery.wymeditor.min.js 1 Jun 2009 07:20:21 -0000 1.1 @@ -0,0 +1 @@ +if(!WYMeditor){var WYMeditor={}}(function(){if(!window.console||!console.firebug){var b=["log","debug","info","warn","error","assert","dir","dirxml","group","groupEnd","time","timeEnd","count","trace","profile","profileEnd"];WYMeditor.console={};for(var a=0;a "+WYMeditor.TOOLS+""+WYMeditor.CONTAINERS+WYMeditor.CLASSES+""+WYMeditor.HTML+WYMeditor.IFRAME+WYMeditor.STATUS+""+WYMeditor.LOGO+"",logoHtml:"WYMeditor",iframeHtml:"",editorStyles:[],toolsHtml:"",toolsItemHtml:"{Tools}
"+WYMeditor.TOOLS_ITEMS+"
"+WYMeditor.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:"",containersItemHtml:"{Containers}
"+WYMeditor.CONTAINERS_ITEMS+"
"+WYMeditor.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:"",classesItemHtml:"{Classes}
"+WYMeditor.CLASSES_ITEMS+"
"+WYMeditor.CLASS_TITLE+" ",classesItems:[],statusHtml:"",htmlHtml:"{Status}
",boxSelector:".wym_box",toolsSelector:".wym_tools",toolsListSelector:" ul",containersSelector:".wym_containers",classesSelector:".wym_classes",htmlSelector:".wym_html",iframeSelector:".wym_iframe iframe",iframeBodySelector:".wym_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",summarySelector:".wym_summary",submitSelector:".wym_submit",cancelSelector:".wym_cancel",previewSelector:"",dialogTypeSelector:".wym_dialog_type",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",dialogFeaturesPreview:"menubar=no,titlebar=no,toolbar=no,resizable=no,scrollbars=yes,width=560,height=300,top=0,left=0",dialogHtml:"{Source_Code}
"+WYMeditor.DIALOG_TITLE+"