#1785: New lines and extra whitespaces removed inside a <pre> tag
--------------------------------------------+-------------------------------
Reporter: laurentiusoica | Owner:
Type: Bug | Status: new
Priority: Normal | Milestone:
Component: Project : MediaWiki+FCKeditor | Version:
Resolution: | Keywords: Confirmed
--------------------------------------------+-------------------------------
Comment (by lutzclem):
mertam,
thank you for your effort. I changed fckplugin.js to include your fix. For
me it works in IE6, but not in Firefox-2.0.0.12. The behavior in FF is the
same as in the unpatched version.
Nevertheless I made a patch for easier handling of the code and to make
the changes a bit more clear:
{{{
diff -Naur FCKeditor_backup/plugins/mediawiki/fckplugin.js
FCKeditor/plugins/mediawiki/fckplugin.js
--- FCKeditor_backup/plugins/mediawiki/fckplugin.js 2008-02-29
09:35:10.000000000 +0000
+++ FCKeditor/plugins/mediawiki/fckplugin.js 2008-03-13
07:26:10.000000000 +0000
@@ -456,7 +456,15 @@
stringBuilder.push( '>' ) ;
this._inPre = true ;
-
this._AppendChildNodes( htmlNode, stringBuilder ) ;
+
+ if (
FCKBrowserInfo.IsIE ) {
+
stringBuilder.push( htmlNode.innerText );
+ } else {
+
var insertText = htmlNode.innerHTML;
+
insertText = insertText.replace( /\<br\>/g, '\n' );
+
stringBuilder.push( insertText );
+ };
+
this._inPre = false ;
stringBuilder.push( '<\/' ) ;
stringBuilder.push( sNodeName ) ;
@@ -691,4 +699,4 @@
}
}
}
-}) ;
\ No newline at end of file
+}) ;
}}}
--
Ticket URL: <http://dev.fckeditor.net/ticket/1785#comment:14>
FCKeditor <http://www.fckeditor.net>
The text editor for Internet
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
FCKeditor-Trac mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/fckeditor-trac