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
Tralala
�literal0�
Trala
And now I try to actually type the exaxt same. I use PROTECTED style as I type
Tralala
Some text
Trala
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
Trala
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.
CC
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
CC