Badly placed Teaser Break <!--break--> causes FCK Editor to hang in IE or move the break in Firefox
| Project: | FCKeditor - WYSIWYG HTML editor |
| Version: | 6.x-2.0-beta1 |
| Component: | User interface |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | postponed (maintainer needs more info) |
Jump to:
I have FCK installed with version 2.6.4 of the plugin. If there is a badly placed tag, it seems to hang when re-editing the node. My client is using copy pasted from Word (with the "Paste Word" buttom) so it's full of SPANs and DIVs.
To re-produce: -
1. Create a node with the following body HTML (a cleaned up example): -
<p><span>Paragraph 1</span></p>
<p><span>Paragraph 2<!break--></span></p>
<div><span>Div 1</span></div>2. Save the node
3a. Edit the node in IE will cause the browser to hang. When it eventually comes back, the HTML has changed to: -
<p><span>Paragraph 1</span></p>
<p><span>Paragraph 2 <!break--></span></p>
<p> </p>
<p> </p>
<div><span>Div 1</span></div>Notice the two extra Paragraphs.
3b. Edit the node if Firefox will move the to the end of the HTML.
I know the client should not be putting the break here, but he can't help it - he just clicks his cursor on the end of the line and clicks the "Break" button.
Dubs

#1
Where in the code is the break?
#2
Sorry - the break tag was not visible (of course - it's an HTML comment!!)
I've edited the post now...
#3
Are you sure it's not
<!--break-->?#4
It is <--break--> as you have typed it (i.e. with the !). When I typed it above in the body, it didn't display, I guessing because it was parsed as an HTML comment.
#5
Dubs,
I just copied and pasted your code with the break tag done correctly and "code" tags around it and it outputs correctly as you see
<p><span>Paragraph 1</span></p><p><span>Paragraph 2<!--break--></span></p>
<div><span>Div 1</span></div>
Now you know why I tell my web design students to NEVER generate HTML from Word and avoid cutting and pasting from Word documents. Is your client letting FCKeditor clean the Word formatting when he pastes the text into the box? I sometimes go to the extreme of pasting the Word text into a text editor like Notebook++ and then copying and pasting it from there to remove all of the Word formating. Of course then you have to format it in FCK.
But I couldn't reproduce your problem. I'm using FCKeditor 6.x-1.4-rc1 with the FCK v2.6.4.1 plugin. I just generated some text in Word, changed the color of a word at the end of the line to generate the span and div tags and pasted it into FCK. When I clicked at the end of the first paragraph and entered the teaser break, it was AFTER the
</div>tag, not between the</span>and</div>as you showed it.Here is the code:
<p> </p><div style="margin: 0in 0in 0pt">This is the first <span style="color: red">paragraph</span></div>
<!--break-->
<div style="margin: 0in 0in 0pt">This is the second paragraph</div>
Hope this helps.
#6
Thanks for checking this out. There is the FCK Editor Word option (and it warns people) but sometimes our clients just don't follow instructions correctly. I'll upgrade the FCK modules and plugins and see what happens this time.
Thanks again,
Dubs