Ask Your Question

How to stop Writer from putting “bloated” html code on Wordpress? (Text is copied from Writer, then pasted on Wordpress’ Visual editor.)

asked 2019-05-19 18:31:42 +0200

hillstorm gravatar image


First, some preliminary details:

  • OS: Linux Mint 19.1 Cinnamon (1 month old. I’m a noob.)
  • LibreOffice version:
  • File format being used: ODT, DOCX

I always write on a word processor first (offline) before copy-pasting it on Wordpress. Writing directly online doesn’t work for me.

I do all the formatting on the word processor (which are usually only bold, italic and paragraph spacing).

On Wordpress, format-wise, I only put the heading tags. I always use the “Visual” editor.

I checked the “Text” editor after I noticed that the headings were not rendering their corresponding CSS (font-size, mostly).

Same thing happens whether the text I copy is from an ODT or DOCX. (I mostly use DOCX because I have another PC that runs Windows, on which I’m not planning to install LO.)

So… (just to be clear) here’s what happens: I copy all that I wrote on LO Writer, paste it on Wordpress’ “Visual” editor, and then click the “Text” editor tab, where I see all these “bloated” html codes, particularly:

<p class="western"><span style="font-size: medium;"><span lang="en-US">Sample text here.</span></span>

This set of code is present in EACH paragraph.

Thank you.

edit retag flag offensive close merge delete


LibreOffice puts the copied part in various formats into the clipboard. Use a clipboard viewer to see these. It is up to the target application to take that format, that is useful in its context.

Regina gravatar imageRegina ( 2019-05-19 19:00:23 +0200 )edit

Thanks Regina. I just installed Clipit and will be looking into the clipboard. I'm just looking for a way for Writer to use "simpler" html with basic copy-paste. MS Word does it. MS Word yields something like <p>Sample text here.</p>. It would be time-consuming to edit a lot of heading html's on the Text editor just to remove that font-size that Writer imposes. (I prefer Wordpress' Visual editor much, much more than Text editor.)

hillstorm gravatar imagehillstorm ( 2019-05-20 05:46:08 +0200 )edit

1 Answer

Sort by » oldest newest most voted

answered 2019-06-11 10:12:47 +0200

omiobg gravatar image

updated 2019-06-11 10:14:47 +0200

Hello. How to stop it any way? What should i do to paste <p>Sample text here.</p> not <p class="western"><span style="font-size: medium;"><span lang="en-US">Sample text here.</span></span></p>?

edit flag offensive delete link more


To get something like

Sample text here.

use a simple text editor like the Windows Notepad or a Real HTML Editor LibreOffice and ApacheOpenOffice are not meant for making HTML, They are designed as free Office Suites.

JEDIMASTER gravatar imageJEDIMASTER ( 2019-06-11 14:15:18 +0200 )edit

Maybe you do not understand why people go to the support service with similar questions. To make it clearer, I will describe the process in more detail. I order articles from people from different countries of the world as my websites are multi-language. They all use different text editors for writing articles. Someone uses Windows (MO), someone Linux (LO). When I copy the already-marked text (meaning headings and paragraphs) into a new article (WordPress), I get a ton of extra css code (even more than words in the article). To avoid this, I first copy the text into a simple text editor and then into a new article. Further, I myself mark everything according to the idea of ​​the author. This is called extra work. The question is how to avoid this. How to copy tagged text from LibreOffice without unnecessary code. How to avoid unnecessary work that takes a ...(more)

omiobg gravatar imageomiobg ( 2019-06-13 10:14:49 +0200 )edit

From your answer, I understood only that LibreOffice is not able to resolve this situation as you advised to use another text editor. I apologize for the mistakes because English is not my native language.

omiobg gravatar imageomiobg ( 2019-06-13 10:14:55 +0200 )edit

The people here like myself are only other users like you. No paid Tech Support here.

JEDIMASTER gravatar imageJEDIMASTER ( 2019-06-17 19:44:22 +0200 )edit
Login/Signup to Answer

Question Tools

1 follower


Asked: 2019-05-19 18:31:42 +0200

Seen: 1,267 times

Last updated: Jun 11