A <pre> block gets mangled by switching between the Wysiwyg and text editors, so that line breaks are lost. To reproduce, use the old-style text editor to make a wiki page containing
Save the page. As expected, it shows a block of preformatted text with two lines.
Now go to Edit. The page appears in the Wysiwyg editor. (I am using the default template and preferences that come with TWiki-4.2.0.) Press the icepick icon to switch to the old-style text editor.
Expected result: the text is there exactly as I entered it last time, with line breaks in the <pre> section.
Actual result: the line breaks have been lost so it now reads
In general, the text editor should always show exactly the code that was entered last time. It shouldn't get altered in any way between one edit and the next.
- 07 Feb 2008
I am able to reproduce this, many thanks for the detailed instructions. Confirmed.
Later: I wrote a unit test for this, and the translator correctly handles the newlines in the pre block. Therefore the problem lies somewhere in TinyMCE
Changed attribution to TinyMCEPlugin
- 27 Mar 2008
As far as I can determine, Tiny MCE does not respect newlines in pre blocks. It's definitely the editor that is eating them, and nothing to do with the mapping to and from TML.
- 27 Mar 2008
Same for verbatim and code beautifier blocks. So they would need to fix this in TinyMCE
- 01 Jul 2008
- 04 Jul 2008
It is only pre blocks that get lines merged.
A work around is to put sticky tags around (protect forever in Wysiwyg)
- 27 Jul 2008
This is fixed in the latest TinyMCE