r1343 - in xwiki/trunk/src/main/web: tiny_mce wiki_editor/plugins
Phung Hai Nam
namphunghai at users.forge.objectweb.org
Wed Sep 27 11:00:05 CEST 2006
Author: namphunghai
Date: 2006-09-27 11:00:04 +0200 (Wed, 27 Sep 2006)
New Revision: 1343
Added:
xwiki/trunk/src/main/web/tiny_mce/blank.htm
Modified:
xwiki/trunk/src/main/web/wiki_editor/plugins/core.js
Log:
Added blank.htm to 'tiny_mce' to fix the bug XWIKI-302 "WYSIWYG Editor error 404 showing up while loading"
Added: xwiki/trunk/src/main/web/tiny_mce/blank.htm
===================================================================
--- xwiki/trunk/src/main/web/tiny_mce/blank.htm 2006-09-26 04:22:24 UTC (rev 1342)
+++ xwiki/trunk/src/main/web/tiny_mce/blank.htm 2006-09-27 09:00:04 UTC (rev 1343)
@@ -0,0 +1,9 @@
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+ <title>blank_page</title>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
+</head>
+<body class="mceContentBody">
+
+</body>
+</html>
Modified: xwiki/trunk/src/main/web/wiki_editor/plugins/core.js
===================================================================
--- xwiki/trunk/src/main/web/wiki_editor/plugins/core.js 2006-09-26 04:22:24 UTC (rev 1342)
+++ xwiki/trunk/src/main/web/wiki_editor/plugins/core.js 2006-09-27 09:00:04 UTC (rev 1343)
@@ -34,7 +34,6 @@
this.addInternalProcessor((/<table\s*([^>]*)class=\"wiki-table\"\s*([^>]*)>([\s\S]+?)<\/table>/i), 'convertTableInternal');
this.addExternalProcessor((/\*(.+?)\*/gi), '<b class="bold">$1<\/b>');
- this.addExternalProcessor((/__(.+?)__/gi), '<b class="bold">$1<\/b>');
this.addInternalProcessor((/<strong[^>]*>(.*?)<\/strong>/gi), '*$1*');
this.addExternalProcessor((/~~(.+?)~~/gi), '<i class="italic">$1<\/i>');
@@ -120,9 +119,7 @@
str = str.replace(/<div class="paragraph">([\s\S]+?)<\/div>/g,'$1');
str = str.replace(/<p class="paragraph">([\s\S]+?)<\/p>/g,'$1');
str = str.replace(/<span class="wikiexternallink">([\s\S]+?)<\/span>/gi,'$1');
- str = str.replace(/<\/?span[^>]*>/gi, "");
- str = str.replace(/<\/?p[^>]*>/gi, "");
- str = str.replace(/<br \/>/g, '\r\n')
+ str = str.replace(/<span class="wikilink">([\s\S]+?)<\/span>/gi,'$1');
return str;
}
@@ -187,7 +184,7 @@
if (lines.length == 1) colj = cols[j].replace(/<br \/>/g, "").replace(/\r\n/g, "");
else if (lines.length > 1)
for (var l=0; l < lines.length; l++)
- lines[l] = lines[l].replace(/\r|\n/g, "");
+ lines[l] = lines[l].replace(/<br \/>|\r|\n/g, "");
for (var k=0; k < lines.length; k++)
if (lines[k] != "")
if (k < (lines.length - 2)) colj += (lines[k] + "\\\\" + "\r\n");
@@ -757,7 +754,6 @@
WikiEditor.prototype.convertTableExternal = function(regexp, result, content) {
var text = this.trimString(result[1]);
- text = text.replace(/<br \/>/g, '\n');
var lines = this._getLines(text);
var str = "<table class=\"wiki-table\" cellpadding=\"0\" cellspacing=\"0\" align=\"center\">"
for (var i=0; i < lines.length; i++)
More information about the Xwiki-notifications
mailing list