Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to make tinymce paste in plain text by default

Googled it thousands of times, No one gives a complete solution of how to make Tinymce paste in plain text by default and strip out any formatting without clicking the "paste as text" button.

Any Ideas of how to implement that? or how to enable the "paste as text" button automatically?

Thank you

like image 235
CodeOverload Avatar asked Apr 23 '10 02:04

CodeOverload


People also ask

How do I save HTML content of TinyMCE into a file?

To save the page, you have to insert TinyMCE in a HTML form and add a submit button. Then you'll have to handle the submitted form with a language like PHP. A call to the file_put_contents() function should do it.

How do I remove TinyMCE from textarea?

Use tinymce. remove() method to remove TinyMCE editor from the HTML element and again call tinymce. init() on the selector to reinitialize.


1 Answers

For the tinyMCE 3X or 4X things have change a little. now you can do this and it works fine.

tinymce.init({     plugins: "paste",     paste_as_text: true }); 
like image 99
Paulo Almeida Avatar answered Sep 19 '22 12:09

Paulo Almeida