Microsoft Word is a word processor, which injects tons of proprietary formatting. WordPress is an HTML-based publishing system.
In a sense, they speak two entirely different languages, and though they make an attempt to understand each other, sometimes they simply can’t.
If you really want to write in an external application, it’s much better to use a blogging client instead: https://codex.ww.wp.xz.cn/Weblog_Client
Hi, when you paste text that was formatted with Word directly into Visual Editor it produces very messy HTML code. So it is better to use WordPress Visual Editor to format your post. If you want to paste content from your Word document, paste text to the Text Editor and format it using Visual Editor. Also, you will have to upload the images to WordPess before adding them to your post.
Thread Starter
Eterud
(@eterud)
Hello, thank you for your responses.
@james Huff, as far as I know is word the most popular weblog client, as it replaced the old “Livewriter”(Livewriter was a stripped down version of word anyways- exactly the same, just less functions)
@romanbon I’m not talking about pasting text. I’m talking about publishing using Microsoft Word.
(In word, click on New> Blog post> write your post>Publish.)
It then publishes your post(or saves as a draft) through the xlmrpc.php
It looks like wordpress cuts down most of the “clutter codes”. However, it still imports the <Span></span> code, along with some
<li> and <Div>‘s.
If there was some way to strip those tags when publishing through the xlmrpc.php. (especially the span tags) then word would be the ultimate wordpress publisher.
So, anyone knows how to automatically remove the style tags such as
<span>
?
Popularity or not, it doesn’t sound like Word is a very good weblog client (if it even is, which would be news to me). π
Code like that is HTML formatting. Are you saying that you’re seeing empty <span></span> blocks?
Thread Starter
Eterud
(@eterud)
Nah not empty, but for every single line I wrote I have
<span style="Times new roman" size="18">Title </span>
<h1><span style="Times new roman" size="18">header </span></h1>
<span style="Times new roman" size="12">normal text first sentence </span>
<span style="Times new roman" size="12">normal text secondsentence </span>
Anyways, found a work around, not perfect but it ‘s better than using the build in text editor.
It’s a 10 month old plugin called cleanup HTML or HTML cleanup.
Adds 1 button to the visual editor and if you click it it removes all ‘<span>, <div>’ and all other useless html codes.
Oh, that’s normal. Microsoft is translating your font and size choices into HTML. I wouldn’t exactly call that useless. π
<span style="Times new roman" size="12">Anything in here will be 12-point Times New Romain.</span>
Thread Starter
Eterud
(@eterud)
Yea, I know what it does.
I call it useless, as it slows down a website with unneeded code. you got style.css after all to take care of your styles, fonts and so forth ^^
Yeah, that will happen when you use a formatting-focused word processor like that. They just assume you want the formatting.
Have you tried any of the other blogging clients at https://codex.ww.wp.xz.cn/Weblog_Client ? Many have plain text modes, some it’s their only mode.