Categories
JavaScript Answers

How to make TinyMCE paste in plain text by default with JavaScript?

Spread the love

Sometimes, we want to make TinyMCE paste in plain text by default with JavaScript.

In this article, we’ll look at how to make TinyMCE paste in plain text by default with JavaScript.

How to make TinyMCE paste in plain text by default with JavaScript?

To make TinyMCE paste in plain text by default with JavaScript, we can set the paste_as_text option to true.

For instance, we write

tinymce.init({
  plugins: "paste",
  paste_as_text: true,
});

to call tinymce.init with an object with the paste_as_text property set to true to make it paste as text by default.

Conclusion

To make TinyMCE paste in plain text by default with JavaScript, we can set the paste_as_text option to true.

By John Au-Yeung

Web developer specializing in React, Vue, and front end development.

Leave a Reply

Your email address will not be published. Required fields are marked *