1

If I create an HTML document with a simple <pre> formatted text


<body>
<p>This is a test
<ul>
    <li>this is an item
    <li>this is another
    <li>this is the third
</ul>
<p>
<pre>
{ "firstName": "John",
  "lastName": "Smith",
  "age": 25 }
</pre>
</body>

Open it in Chrome, and paste it into MS Word 2011, it comes out without the newlines in the <pre>:

enter image description here

OTOH, if I do the same paste in LibreOffice, the <pre> is preserved. Oddly, if I select just the area in the <pre>, and paste as text, the newlines are preserved.

Does anyone know a trick to make this work without having to manually reformat all my <pre> content?

0

You must log in to answer this question.

Browse other questions tagged .