I have an application using FCKEditor 2.6 and users of this app have been reporting that sometimes text they paste into the editor moves to a different position or disappears altogether. I suspect that this is being caused by pasting in bad HTML from other sources, but so far I haven't been able to reproduce it. Has anyone else encountered this problem, and if so, do you have any insight or suggestions? Thanks!
Thu, 07/31/2008 - 18:14
#1
Re: Text moving or disappearing
The text that is giving us issues originally came from MSWord, which then had images reinserted (they didn't remain in place when pasting in the content), formatting done, and links added to the page.
I suspect the same as you, that it's a formatting issue throwing something off. I don't think it's related to the incoming content since it doesn't happen on all articles, but more likely how the formatting is done. I've noticed that there is some weird behavior when you get 2 styles next to each other and you add and remove space in between them.
Hopefully someone can find a fix for this.
Re: Text moving or disappearing
I just tried installing it today and ran into the same problem. I cut and paste from a web page. Part of the text is white, so I highlight that portion of the text, change it to black, and everything else in the editor vanishes (gone from HTML as well). However, I cannot reproduce this with the online demo, even with the same content and same actions.
It happens about 3/4 of the time for me, but I'm still trying to track down what differences cause it to happen and which ones don't. Plus the HTML content I'm using as a test sample isn't Word generated clutter. (It also isn't all perfectly formatted either, for example it has several font tags for coloring that span paragraphs, but I believe all tags are properly nested.)
I'll post if I can narrow anything down further, but it would be great if someone found a fix, of course.
(And for what it's worth, I'm testing this in IE6 embedded in a .Net page).
Edit: Just tried in Mozilla 3 - same page and content, and cannot reproduce the error. Paying more attention in IE, I notice there's a javascript error:
Line: 61
Char: 2779
Error: 'childNodes[...].previousSibling' is null or not an object
Code: 0
URL: [my local site URL]/fckeditor/editor/fckeditor.html?InstanceName=FCKeditor1&Toolbar=Default
I'll try to see if I can get it to break in Mozilla where there's better debugging tools, but that's what I've found so far.
Re: Text moving or disappearing
I'm using Firefox 3.0.1
Mark
Re: Text moving or disappearing
I just wanted to find out if anyone established the main cause of this problem. The editor is used heavily by the data entry team at my company and they complain about this occuring from time to time. This is regardless of whether they are copying over from word, a website or textpads.
I have tried to reproduce it but i can't.
Re: Text moving or disappearing
Most recently it was ignoring <br> tags and deleting everything after them on a specific page. I even put the code into Dreamweaver and cleaned it up and pasted it in code view, but it didn't help (even though that's fixed the problem before).
I then switched over to Safari and pasted the code. It worked just fine. I could even switch between code and WYSIWYG mode without anything going away. So I saved it. I then I re-opened it in Firefox and it was having the same problem.
Edit: Logged out of site in Firefox and logged back in an text no longer disappeared on that specific page, but it has happened with different pages on my site.
Re: Text moving or disappearing
The problem is intermittent and I have not been able to find a way to consistently reproduce the problem. It seems to occur with larger amounts of text and complex HTML.
We have had reports of this happening lately with links inside of table cells.
Re: Text moving or disappearing
Same problem here. Only I can reproduce it in MSIE. Also tested in Firefox, but works fine there. The text a user of my was trying to copy can be found here: http://dev.deems.nl/vacature.htm. If you copy the text in the wysiwyg editor, then switch to source (or just submit), most of the text disappears. But if you do it twice, first copy the text to the editor, switch to source, switch back and paste the text again, the text is saved without missing parts. If I copy the text to another text editor like MS Word and copy the text from Word to the editor, everything works fine.
Unfortunately I can't show the complete FCK editor for it's in a secure environment, but you can view the fck config here: http://dev.deems.nl/fckconfig.js.
If more information is needed to solve the problem just ask.
Re: Text moving or disappearing
Re: Text moving or disappearing
I realized that it was because I was testing a user without the rights to switch to plain text. When I changed that (made it possible), everything worked fine.
Re: Text moving or disappearing
I'm able to reproduce this issue consistently with the attached html code and the fckeditor demo
Steps to reproduce:
1. Copy source of html file from code section below
2. Goto http://www.fckeditor.net/demo and go into Source Editor mode
3. Paste the html source
4. Scroll to bottom and note the last few lines of the code
5. Switch to wysiwyg mode, scroll to bottom and note the last few lines
6. Switch to Source Editor mode again and check last few lines
Repeated triggering between source and wysiwyg, you'll noticed that the text is moved around and some are missing. In IE7, text is getting moved around. In FF3, text is getting truncated.
Why is this happening? How can I fix this? Please advise. Thank you.
Re: Text moving or disappearing
Re: Text moving or disappearing
So anything can happen when you provide something that way.
Fix your HTML and then if you think that there is still some problem, create a minimal testcase.