‘Paste as text’ by default in WordPress Visual Editor


Build your own WordPress Support Plan

Expert, yet affordable WordPress support & maintenance plans.
View our pricing

This is a very quick guide that will explain how you can set the ‘Paste as text’ option to be active by default in the WordPress visual editor to prevent styles from being pasted into your content editor and ruining your layouts.

1. Using Plugin

Enable paste as text by default with one click in editors like Classic Editor, Divi, Elementor, Beaver Builder, WPBakery, and WPUF (but not in Gutenberg).

No more unwanted formatting issues or junk code when copying and pasting text into your WordPress editor. Paste content from pdf documents, emails, or other websites without importing colors and font stylings that don’t match your overall design.

image 30

2. Using Coding (The function)

I’ll cut right to the point, here is the function you will need to use to force the ‘Paste as text’ option to be active by default in the WordPress visual editor.

 * Paste as plain text Default
function wphelper_paste_as_text( $init ) {
    $init['paste_as_text'] = true;
    return $init;
add_filter('tiny_mce_before_init', 'wphelper_paste_as_text');

You can place the function above in your theme functions.php file or an MU plugin which would be a better option, this will now force the ‘Paste as text’ option to be on unless clicked in the visual editor. No longer will you accidentally paste formatted text into WordPress or have to worry about your clients doing so.

If you get stuck with adding this function to your site please leave a comment below or contact us.

For more information on ‘Paste as text’ by default in WordPress visual editor, let us help you accordingly, from start to finish, with one-Time fixes, custom plans, or monthly routines for your WordPress website.

Written By
Founder of WP Helper.
You will also like these articles

Relax Knowing Your WordPress Site Is Secure & Running Smoothly 24/7

Let us manage your WordPress site, everything from security to updates will be taken care of. Support plans also come with dedicated support so we can do anything from adding content to customising your site for you.

Same Day Professional WordPress Support

Get WordPress Support Today

Need help with a single WordPress problem, today? We can help with anything from adding analytics tracking code to site hack recovery. Full money back guarantee on all jobs.

1. Submit a Support Request

Use our support ticket form below to send details of your problem to our developers.

2. Get a Quote

We will review your request and provide a quote within 24 hours (but usually within a few hours).

3. We fix your WordPress problem

Our team will begin fixing your WordPress problem the same day.

4. 100% Money Back Guarantee

If we can’t fix the problem for the amount quoted we will refund you 100%.

  • Do you have a screenshot of the issue or have a copy of the theme or plugin that is at fault? If you want to upload php, html or css please zip first.
    Drop files here or
    Accepted file types: jpg, jpeg, png, pdf, zip, gzip, rar, doc, txt, Max. file size: 15 MB, Max. files: 10.