Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I've found that copying and pasting tables from MS Word was closest to easiest when it comes to making tables; rather than formatting a table from scratch in a WYSIWYG editor.

The one shortfall I've found is that the "center" formatting does not copy over. It LOOKS like it does but the formatting is not actually applied. you have to go through each cell and center it.

Just wondering if anyone has a clue on how the WP editor handles MS Word and maybe if there's a fix?

share|improve this question
    
Current I'm doing a regex replace from <p align="center"> to <p align="center" style="text-align: center;"> as the cells seem to contain that format. –  AlxVallejo May 2 '12 at 20:23

3 Answers 3

You may encounter other formatting issues or fragments whenever pasting from Word. Have you tried TinyMCE Advanced? It adds some better handling of tables to the editor, although it doesn't help you paste from Word, it will at least make it easier to recreate the tables visually instead of in code view.

share|improve this answer

There is a "paste from Word" button. When you're using the WYSIWYG editor (Visual tab), there's a button that has a bunch of colored dots on it. When you hover over it, a little box tells you it's called "kitchen sink". Click it to expand, and you'll see a button with the Word icon. Use that to paste in Word content. It's not 100% effective, but it's better than direct copy/paste.

The problem with copying from Microsoft Word is that the characters used to create the content in a Word document are specific to the Word Program. Other programs won't understand many of the characters and "code" MS Word pops in there. (You can always tell a site that has someone who wrote the content in Word and pasted it onto their site - ever see those weird black diamonds with question marks in the middle? or the capital A with weird characters in odd spots? That's a "pasted from Word" content bit. the browser can't render the MS Word-specific characters. it's kind of like popping a English-speaking-only American in China and telling them they have to teach a group of people how to cook a 10-course meal in 20 minutes - in Chinese. The American would be like "Huh?")

I always tell my clients not to bother writing their content in Word. Write it in WordPress and save yourself the headache of trying to fix all the junk/bloat Word puts in there. The Visual editor already has the buttons you need to do what you need, and you don't get the bloat.

share|improve this answer
    
Thanks @Shelly. Getting your clients to stop using Word is a real challenge. My clients use Word to create PDFs and format pretty tables. Dealing with a WYSIWYG editor for tables (in my experience) has been a nightmare. –  AlxVallejo Jun 4 '12 at 17:52
    
I actually wrote a piece of code that looks for Word-specific stuff that gets pasted into WordPress - if it's detected, then it won't display the content on the site. Instead it'll leave a message for the person that wrote the post to clean out the Word-bloat. It was written as a joke for a colleague, but it actually has turned out to be quite popular - I've had many people actually use it! They've reported it seems to force their clients to stop depending on Word so much! –  Shelly Jun 4 '12 at 21:31
up vote 0 down vote accepted

I actually have a pretty awesome way to get the HTML output of the Microsoft Word table formatting.

I use MS Live Writer and copy and paste from MS Word. Then I can simply view the HTML output and copy and paste that into the WordPress editor. It works perfectly.

The only downside is that now you have a ton of in-line CSS formatting on the table itself. You can't really accomplish the same with stylesheets if you have variety and complexity across different tables you want to publish.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.