Gillar du att skriva i Microsoft Word istället för WordPress? Vill du importera .docx-dokumentet i WordPress istället för att kopiera / klistra in vilket vanligtvis förstör formatet? I den här artikeln visar vi dig hur du importerar .docx-dokument i WordPress.
Varför och när behöver du importera .docx-filer i WordPress på rätt sätt?
Vissa användare föredrar att skriva sina artiklar i Microsoft Word, som kommer med en built-in stavningskontroll, tesaurus, templates, stilar och format. WordPress standard visual editor erbjuder inte alla dessa funktioner.
Ett annat möjligt användningsscenario är gästbloggning. Om du ej vill ge gästförfattare tillgång till din WordPress admin area, skickar de ofta sina gästposter antingen i vanlig HTML eller i ett .docx-dokument.
Slutligen kanske du redan har en del content sparat i .docx-dokument. Att copy and paste från docx kan vara svårt, särskilt om du måste kopiera content från flera dokument.
Med detta sagt, låt oss se hur du kan importera .docx-dokument på rätt sätt i WordPress utan att bryta formatet.
Importera .docx-dokument i WordPress
Det första du behöver göra är att installera och aktivera pluginet Mammoth .docx converter. För mer detaljer, se vår steg-för-steg guide om hur du installerar ett plugin för WordPress.
Efter aktivering måste du skapa ett new post eller editera ett befintligt. På vyn för edit av post hittar du metaboxen Mammoth .docx converter under editor för post.
Klicka bara på knappen Välj fil för att selecta en .docx-fil från din dator.
Så snart du väljer .docx-filen kommer pluginet att visa dig tre views för dokumenten. I tabben Visual ser du hur dokumentet kommer att se ut i WordPress.
Du kommer att notera att det kommer att ignorera alla stilar som tillämpas på dina .docx-dokument som textfärg, bakgrundsfärg, padding, marginal, etc. Istället kommer det att låta ditt temas stylesheet kontrollera hur dessa saker ska visas.
Du kan också viewa den HTML som genereras av konvertern genom att clicka på knappen Raw HTML. You can click on the messages button to see if there were any warnings or errors during conversion.
Om du är nöjd med hur dokumentet ser ut i den visuella tabben kan du klicka på knappen ”Insert into editor”. Pluginet kommer att insert konverterad HTML i din WordPress post editor.
Du kan fortsätta att arbeta med posten. Om du är ny på WordPress, kanske du vill se vår guide om hur du lägger till ett nytt inlägg i WordPress och använder alla utvalda funktioner.
Mammoth .docx converter plugin konverterar en .docx-fil till ett rent HTML-format som är kompatibelt med WordPress. För närvarande stöder pluginet följande funktioner:
- Headings som Heading 1, Heading 2, konverteras till h1,h2, etc.
- Listor
- Tabeller importeras utan format som gillar kant- och cellfärger
- Vanlig HTML-format gillar fet, kursiv, superscript och subscript
- Images som är embedda i dokument importeras till WordPress
- Länkar
- Textrutor konverteras till vanliga stycken
Pluginet gör inga ändringar i ditt ursprungliga .docx-dokument, det lagrar det inte ens på din WordPress webbplats.
Vi hoppas att den här artikeln hjälpte dig att importera .docx-dokument i WordPress. Du kanske också vill se vår guide om hur du embedar PDF, kalkylblad och andra dokument i WordPress.
Om du gillade den här artikeln, vänligen prenumerera på vår YouTube-kanal för WordPress video tutorials. Du kan också hitta oss på Twitter och Facebook.
Syed Balkhi says
Hey WPBeginner readers,
Did you know you can win exciting prizes by commenting on WPBeginner?
Every month, our top blog commenters will win HUGE rewards, including premium WordPress plugin licenses and cash prizes.
You can get more details about the contest from here.
Start sharing your thoughts below to stand a chance to win!
Mrteesurez says
Thanks for these, this is what I have been looking for as I used to write my posts offline, this will help me keep the format and style therein.
Hope the plugin also works with Google docs on Mobile ?
WPBeginner Support says
For Google docs you would want to take a look at our guide below for importing Google docs.
https://www.wpbeginner.com/wp-tutorials/how-to-easily-import-google-docs-to-wordpress/
Administratör
james says
The plugin works in 2020, I just used it.
Thank you for the idea
Best wishes
WPBeginner Support says
You’re welcome
Administratör
malcolm brigden says
What this comment coyly neglects to mention is that you cannot use this plug in without having the $250 plan, as I found out to my chagrin after having read it and assumed the functionality I needed would be there with my $120 plan- I wonder what this chap was paid not to have mentioned this key fact in the first paragraph
Malcolm Brigden MD
WPBeginner Support says
It sounds like you are on WordPress.com, all of our tutorials are for WordPress.org. You can take a look at the difference between the two in our article below:
https://www.wpbeginner.com/beginners-guide/self-hosted-wordpress-org-vs-free-wordpress-com-infograph/
Administratör
Ahmed says
I would like to know why when using plugin the other plugin like mammoth , which is docspress which import word press with all details as a short code , why the content is not appearing at all in SEO ENGINES as google
WPBeginner Support says
For issues with a specific plugin, you would want to reach out to the support for that specific plugin and they should be able to assist.
Administratör
Stefaan says
Are there any alternative plugins to use? Mammoth dockx converter no longer works after update.
WPBeginner Support says
Have you reached out to the plugin’s support to see if there is a known issue?
Administratör
Paul says
I used to use mamooth too, but now have switched to ’post docx source’. It’s more powerful.
ze56 says
how about image?
Marty says
WordPress support installed this plug in and it does not input the images in the posts. It is no different than cutting and pasting. And actually it is more time consuming.
Munna says
Agree with Yoda. Just copy the article from wordpress and paste it on Visual editor . You don’t need any plugin for this.
Ravinder says
Hi Syed,
I do not comment often on blog but today I got to upload blog post fast from .docx but didn’t know how to do it. Then I started searching on google and after 4 5 useless blog I came to this page and got answer to how to do it. Thanks
WPBeginner Support says
Glad you found it helpful
Administratör
Jose caceres says
I’ve found the plugin really helpful, as much as WPbeginner. I’m really impressed by the high quality of help provided. Many thanks to the team.
Shoaib Iqbal says
I was searching for this topic and found this post. Amazing it helped me.
Ted Sherwood says
So glad I am signed up to your posts. I just finished a post in a fraction of the time it usually takes. Thanks.
Hemang Rindani says
There are two basic ways to export MS doc files to WordPress Content Management system, one through native server and two, with the help of FTP. Apart from this, WP also has some plugins where mammoth .docx converter is the one with maximum popularity. The effortless dashboard with this plugin makes it easier for a developer to transfer a .docx file to WP without losing the formatting of the file.
Beni Iskandar says
Thank you for this awesome trick, I write my raw article on notepad++ because when you block some of word in this app, you can check how many keyword and where you put it on paragraph .. Hmm it would be great if there build in word count tools.
yuda says
In what way is this different than a simple copy-paste from Word/Google Docs?
It used to be that such direct copy/paste carried with it a lot of garbage – especially office-generated XML – plus a lot of visual hiccups. Nowadays this is not the case, at least not in 99% of the cases. So why still use a dedicated plugin? Am I missing something?
Rodwell Smith says
Why use a converter if you can publish a blog post directly from Word?
Thomy Roth says
Hi Rodwell,
your answer made me curious, how can I post directly from WordPress?
Marty says
Rodney,
It is simple, the WordPress editor is highly limited compared to the functionality of Word 2016.
farhang says
wow!
great article, im one of your fans that come to your website every day. best wp learning base ever