[xwiki-notifications] r8806 - xwiki-platform/web/branches/xwiki-web-1.3/standard/src/main/webapp/wiki_editor/plugins
ludovic (SVN)
notifications at xwiki.org
Tue Apr 1 12:48:29 CEST 2008
Author: ludovic
Date: 2008-04-01 12:48:29 +0200 (Tue, 01 Apr 2008)
New Revision: 8806
Modified:
xwiki-platform/web/branches/xwiki-web-1.3/standard/src/main/webapp/wiki_editor/plugins/core.js
Log:
XWIKI-2260 Wysiwyg editor needs to handle multiple carriage returns properly. IE was still a problem
Modified: xwiki-platform/web/branches/xwiki-web-1.3/standard/src/main/webapp/wiki_editor/plugins/core.js
===================================================================
--- xwiki-platform/web/branches/xwiki-web-1.3/standard/src/main/webapp/wiki_editor/plugins/core.js 2008-04-01 10:05:02 UTC (rev 8805)
+++ xwiki-platform/web/branches/xwiki-web-1.3/standard/src/main/webapp/wiki_editor/plugins/core.js 2008-04-01 10:48:29 UTC (rev 8806)
@@ -17,7 +17,7 @@
this.addInternalProcessor((/<p[^>]*> ?<\/p>/gi), "\\\\\r\n");
- this.addExternalProcessor((/\\\\(\r\n)+/gi), '<br />\r\n');
+ this.addExternalProcessor((/\\\\(\r?)(\n?)/gi), '<br />$1$2');
this.addExternalProcessor((/\\\\/gi), '<br />');
this.addExternalProcessor((/----(-*)/i), 'convertHRExternal');
@@ -950,7 +950,7 @@
WikiEditor.prototype.PARAGRAPH_CLASS_NAME = "paragraph";
WikiEditor.prototype.convertParagraphExternal = function(regexp, result, content) {
- var lines = this._getLines(content);
+ var lines = this._getLines(content);
var str="";
var line = "";
var insideP = false;
@@ -964,9 +964,9 @@
for(var i=0; i < lines.length; i++) {
// Consume blank spaces
line = lines[i];
- var hh = this._hasHTML(line);
+ line = line.replace(/(\r$)|(\n$)|(\r\n$)/gi, "");
+ var hh = this._hasHTML(line);
var hbr = this._onlyHasBr(line);
- line = line.replace(/(\r$)|(\n$)|(\r\n$)/gi, "");
if(line != "" && (!hh || hbr)) {
if(!insideP) {
insideP=true;
More information about the notifications
mailing list