1

I am testing blogging from Word 2007, so we can support users who wish to do so. Everything works fine, and as expected except the plugins that we use that add filters to the_content (eg wordpress-table-of-contents) do not process the posts from Word.

If you open the posts in WordPress & save everything works fine, even if you do not change anything, but we want to be able to avoid this.

For information, the site I'm most concerned about here is an MU site (running WP 3.0.1), but non-MU sites are affected in exactly the same way.

So is there a way to have these plugins process posts that come from Word that doesn't involve interacting with the Wordpress admin panel?

6
  • How do these files that "come from Word" actually make it into WordPress without the user entering them at the WordPress site? Aug 19, 2010 at 16:20
  • What filters are you hooking to? Can you post one of your functions that fails to modify the_content?
    – kevtrout
    Aug 19, 2010 at 23:53
  • @kevtrout - Ah, very nice. Looks like MS scarfed some code from Windows Live Writer which is a great bit of software itself. Unfortunately I don't have Office 2007 I'm running a Mac these days (though I don't love it.) Aug 20, 2010 at 0:12
  • @sjcockell - And chance you could post provide the database for a fresh install of WordPress with a post that exhibits the problem? Or worst case the HTML of the post that is causing the problem which you could post to gist.github.com. If so I'm sure we can identify a fix. Aug 20, 2010 at 0:14

2 Answers 2

1

You could use TinyMCE Advanced, which has a 'paste-from-word' button that you can add to the editor. It doesn't so much make Word posts useful, as make them 'not Word'.

1
  • This requires that users log in to the Wordpress site though, which is what we want to avoid. We would like to enable publishing from as many 3rd party clients as possible, and have them all work the same.
    – sjcockell
    Aug 19, 2010 at 13:49
0

I'm not 100% sure, but I believe the content_save_pre filter runs for posts created via XML-RPC (not just the admin area). You can use this filter to strip out all of Word's excess HTML (using kses for example).

1
  • Isn't there some hooks that work with anything XML-RPC? If not, let's write a quick patch, should be easy to implement.
    – hakre
    Aug 27, 2010 at 22:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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