• briantoronto

    (@briantoronto)


    When pasting in from Word the editor is adding <p style="font-weight: 400;"> to all normal paragraphs. It is not adding this code to any other elements. Is there a way to stop this behaviour? It is happening on all of our sites running current plugin and WP.

    This post has some Bold elements. Some Italic elements.

    <p style="font-weight: 400;">This is a test post</p>
    <p style="font-weight: 400;">This post has some <strong>Bold</strong> elements. Some <em>Italic</em> elements.</p>

    <ul>
    <li>One</li>
    <li>Two</li>
    <li>Three</li>
    <li>Four</li>
    </ul>
    <p style="font-weight: 400;">And a <a href="https://link.local/">link</a>.</p>
Viewing 1 replies (of 1 total)
  • Plugin Author Brian Alexander

    (@ironprogrammer)

    Hi, @briantoronto — I don’t have Word, but suspect that the app has applied the styling to the paragraphs. This is similar behavior to pasting in formatted text from Google Docs.

    To test the content of your clipboard, check out this Clipboard Viewer and paste in some text that was copied directly out of Word. The text/html mime type row would reveal any markup that is included in the clipboard contents. It’s likely even more verbose than what the classic editor accepted.

    I will add that the block editor “sanitizes” pasted content from Google Docs/Word pretty well, so might be another workflow option to explore.

Viewing 1 replies (of 1 total)
  • You must be logged in to reply to this topic.