- cphill
I just upgraded some department sites from drupal 5.1 to 5.3 and noticed that the textareas for nodes now account for line breaks, which is a nice addition for viewing and editing raw HTML code with TinyMCE disabled (5.1 removed all the line breaks). However, this seems to be causing a problem for general users/editors who have been copying and pasting text from word docs into the plain text areas with TinyMCE enabled and disabled. It looks like line breaks are automatically added by the textarea upon submitting the node.
In order to get around this, users have to copy from word, paste the text into a plain text editor, remove all the line breaks, then copy the text back into the node textarea.
Has anyone else experienced this and/or does anyone know if there is a solution (patch) to keeping the line breaks from being added?
Note: The input format for the textareas is "Full HTML".
If you are using TinyMCE, there is a button you can activate in the settings called "paste text/word". There are actually 2 buttons, one for text and one for Word. When you click on the word button, a pop-up will appear where you can copy and paste straight from Word, and it will automatically remove all of that Microsoft junk code that Word likes to copy over. This will ensure that that extra code doesn't gum up your formatting.
To add the button, go to Administer -> Site Configuration -> TinyMCE -> Edit [for the profile you are using] -> Buttons and plugins
Hope that helps
Thanks for the info. I have tried using the paste from word button but I think there's an underlying "invisible" text formatting issue with the textareas. Below are 2 screenshots of the results:
This first screenshot is the result of copy/paste directly from word into the TinyMCE editor. You can see all the Office junk code (and also the line breaks being held):
This is the other screenshot using the "Paste from Word" button -- The Office junk is gone, but the line breaks appear (blue circles) and they remain even after submitting the page. What's weird is that you'd think that since the textarea is reading the HTML tags correctly, that it'd ignore the whitespace and print the lines continously until it came to another division-type HTML tag.
I'm not sure why this is happening...
I ran into this problem as well. I corrected this by one (or both) of these methods:
1. Turn off the line break converter for your input filter. Go to Administer -> Site Configuration -> Input Formats and configure your default type. Make sure the "Line break converter" option is unchecked.
2. If you don't mind loosing your formatting, except for paragraph tags, user the "Paste as plain text" button instead of the "Paste from Word".
That should do the trick
Omg, that TOTALLY did the trick! I'll have to make note of this for future drupal upgrades. I'm wondering if this input format option needs to be reconfigured after an upgrade b/c I wasn't having this problem with 5.1. Oi.
What a relief! Many thanks, Bill - have a good weekend!
This problem only seems to be happening when using FireFox. I have also had this problem and looked all over the Drupal site and the TinyMCE site for help and did not find much help other than doing what Bill said above.