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

Item4705: TMCE / Wysiwyg eats new lines in front of LITERAL tags

Item Form Data

AppliesTo: Component: Priority: CurrentState: WaitingFor: TargetRelease ReleasedIn
Extension TinyMCEPlugin Urgent Closed   minor 4.2.0

Edit Form Data

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


TMCE / Wysiwyg eats new lines in front of LITERAL tags

Easy to reproduce. I am using IE6 / XP sp2

Write some text in a topic

Put some text inside literal tags

Like this


And now I try to actually type the exaxt same. I use PROTECTED style as I type

Tralala Some text


This is the first line after what I protected.

Now I save the topic.

-- TWiki:Main/KennethLavrsen - 23 Sep 2007

Saving again. Strange that the gt and lt becomes entiry encoded inside verbatim. This means verbatim does not work properly either.

-- TWiki:Main/KennethLavrsen - 23 Sep 2007

And edit and save again. Already now first set of new lines are gone

-- TWiki:Main/KennethLavrsen - 23 Sep 2007

3rd time

-- TWiki:Main/KennethLavrsen - 23 Sep 2007

All new lines are now eaten. TMCE or WYSIWYG easts newlines both before and after the literal tags. Result is that you cannot use literal.

-- TWiki:Main.KennethLavrsen - 23 Sep 2007

Forgot to say that this is tested in MAIN. Not in the release branch

-- TWiki:Main.KennethLavrsen - 23 Sep 2007

I made a very detailed test case and I do not see it now. Did you change some other stuff?

I will try harder to reproduce. It certainly did it yesterday. Need sleep first. Wait for more from me.

-- TWiki:Main.KennethLavrsen - 24 Sep 2007

I can reproduce it

But only with literal. And only with IE6. It works better in FF. Again.

Between the next horizon bars I put what fails. I add this with Edit raw.

Some text that I do not want merged on same line as text below

Some bold text as example of HTML we want to keep

And now some text after

I now save this as new revision. And then I start edit and save cycles in TMCE editor in IE.

-- TWiki:Main.KennethLavrsen - 26 Sep 2007

Hmm. And now it works OK here on bugs. Trying again.

Tralala Some text


Yes the 2nd example fails?????!! The newlines get eaten so the "Some text" move up appended on the same line as Tralala even though I started with an empty line betwen the Tralala and the first literal. This should give a paragraph and this paragraph must be maintained after an edit and save.

-- KennethLavrsen - 26 Sep 2007

And I repeated it again. But only the 2nd example fails. They are the same except for the amount of text??!

Revision 5 of this topic is before I edit and save twice with TMCE. And revision 6 is after where the Tralala example shows the problem

-- TWiki:Main.KennethLavrsen - 26 Sep 2007

OK trying again. It seems the --- before the text in the example above prevents the bug from showing.

Saving a rev 7 now of the first example without the ---

Some text that I do not want merged on same line as text below Some bold text as example of HTML we want to keep

And now some text after

-- KennethLavrsen - 26 Sep 2007

and now I edit and save a rev 8 using TMCE. I edit and save twice.

Now notice the change from 7 to 8. Also view raw. I expect the bold text to jump up next to the "below" word because the empty line between them gets eaten.

-- KennethLavrsen - 26 Sep 2007

Yes. Confirmed - TMCE eats newlines in front of literal tags - but in some cases it does not. This prevents usage of literal in most cases.

-- KennethLavrsen - 26 Sep 2007

Some collection of test cases I played with on my home server - see Item4705Test

-- TWiki:Main.KennethLavrsen - 27 Sep 2007

The literal spacing was due to a bug in TMCE on IE. I have worked around it. I can't unravel any other bugs from the description here, so I'm closing it.


There is a problem with your fix.

Each time one saves in IE and you have LITERAL tags, the content inside is wrapped inside a SPAN tag pair. Another is added each time you save. Look at Item4705Test. All I did was make rev 3 100% like rev 1 and then I started edit/save cycles in IE. Each time I saved another <SPAN></span> pair is added.

An example from Item4705Test.

<literal><SPAN><SPAN><SPAN><SPAN><SPAN><SPAN><SPAN><SPAN><B>Some bold</b> </span></span></span></span></span></span></span></span></literal>

-- TWiki:Main.KennethLavrsen - 29 Sep 2007

Should be OK now


Summary TMCE / Wysiwyg eats new lines in front of LITERAL tags
ReportedBy TWiki:Main.KennethLavrsen
Codebase ~twiki4
SVN Range TWiki-4.3.0, Sat, 22 Sep 2007, build 14996
AppliesTo Extension
Component TinyMCEPlugin
Priority Urgent
CurrentState Closed

Checkins TWikirev:15088 TWikirev:15090 TWikirev:15092 TWikirev:15093 TWikirev:15094
TargetRelease minor
ReleasedIn 4.2.0
Edit | Attach | Watch | Print version | History: r14 < r13 < r12 < r11 < r10 | Backlinks | Raw View |  Raw edit | More topic actions
Topic revision: r14 - 2007-09-30 - CrawfordCurrie
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