• Do not register here on develop.twiki.org, login with your twiki.org account.
• Use View topic Item7848 for generic doc work for TWiki-6.1.1. Use View topic Item7851 for doc work on extensions that are not part of a release. More... Close
• Anything you create or change in standard webs (Main, TWiki, Sandbox etc) will be automatically reverted on every SVN update.
Does this site look broken?. Use the LitterTray web for test cases.

Item5337: WYSIWYG edit mode breaks <pre> text

Item Form Data

AppliesTo: Component: Priority: CurrentState: WaitingFor: TargetRelease ReleasedIn
Engine TinyMCEPlugin Normal Closed   major 6.0.0

Edit Form Data

Reported By:
Applies To:
Current State:
Waiting For:
Target Release:
Released In:


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

hello there 

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.

-- TWiki:Main/EdAvis - 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 frown

Changed attribution to TinyMCEPlugin.

-- CrawfordCurrie - 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.

-- TWiki:Main.CrawfordCurrie - 27 Mar 2008

Same for verbatim and code beautifier blocks. So they would need to fix this in TinyMCE?

-- TWiki:Main.GordonTerrell - 01 Jul 2008


-- TWiki:Main.CrawfordCurrie - 04 Jul 2008

verbatim works

It is only pre blocks that get lines merged.

A work around is to put sticky tags around (protect forever in Wysiwyg)

-- TWiki:Main.KennethLavrsen - 27 Jul 2008

This is fixed in the latest TinyMCE-3.5.8.

-- TWiki:Main.PeterThoeny - 2013-10-02

Summary WYSIWYG edit mode breaks <pre> text
ReportedBy TWiki:Main.EdAvis
Codebase 4.2.0
SVN Range TWiki-5.0.0, Wed, 23 Jan 2008, build 16283
AppliesTo Engine
Component TinyMCEPlugin
Priority Normal
CurrentState Closed


TargetRelease major
ReleasedIn 6.0.0
Edit | Attach | Watch | Print version | History: r9 < r8 < r7 < r6 < r5 | Backlinks | Raw View |  Raw edit | More topic actions
Topic revision: r9 - 2013-10-15 - PeterThoeny
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2024 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback