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
.