• Resolved simon_a6

    (@simon_a6)


    Hi.

    We have just come across an issue I never thought WordPress even had – someone has take text from a website page, or a Word document, and pasted it into the Body section of a Product page, and it’s pasted the html code too. Code like Span, Font Size and so on.

    I thought WordPress was smart enough to strip out that code when pasted it (unless one manually adds it).

    Is this correct or is there a plugin that disables it all?

Viewing 7 replies - 1 through 7 (of 7 total)
  • Hi Simon,

    Do you mean it has pasted the code as plain text, so the user can see all the code? Or that is has pasted the code and the user sees formatted code?

    Thanks

    Mark

    Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    someone has take text from a website page, or a Word document,

    Most likely Microsoft Word.

    You should find a “Toggle Toolbar” button in your Visual Editor. Press that to show more tools, including a tool named “Clear formatting”. Press that “Clear formatting” button after you’ve entered your posts to ensure styling is stripped out.

    Edit: Just realised this may not be available in a default installation. If it’s not, use Natalie’s advice below.

    • This reply was modified 7 years, 5 months ago by Andrew Nevins.

    Hi Simon!

    WordPress is smart enough. However there are a couple of caveats.

    First off, there’s a button just for that in the editor. The “Paste As Text” button. If you want to paste content copied from another page or platform (like Word), you need to press the Paste As Text button in visual editor before pasting your text to strip off the formatting style of the text.
    Paste as Text

    Also, when using the text (html) editor to edit your styling, don’t switch between the text and visual editor back and forth, because WP gets a bit crazy and your text won’t be displayed as it should.

    ??

    Thread Starter simon_a6

    (@simon_a6)

    I never knew that was there.
    Is it possible to enable that all the time? Or do you have to go into a Product/Page/Post, click that each time, and then paste?

    Are you referring to the Paste as Text button?

    You need to press it every time before pasting your content. You would go into the product/post/page editor anyway to paste your text, right? ?? Just click this before pasting. ??

    Thread Starter simon_a6

    (@simon_a6)

    Ok. I can ask the person to do that yes. Just a shame it cannot be left “on”, so it always forces it to remove the coding.

    Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘How do I stop Copied code into Body?’ is closed to new replies.