How to prevent/disable copy and paste in Tinymce
To prevent the users to copy and paste the content in the tinymce, we can use the JavaScript.
Steps:
1. Download the tinymce from TINYMCE DOWNLOAD
2. Insert the below code in the init-tinymce.js
file, which is present in the
file-path: plugin -> tinymce -> init-tinymce.js
paste_preprocess: function(plugin, args) { console.log(args.content); args.content = ''; }
Final Code will become like this TINYMCE COPY/PASTE VERSION .
You can directly download the tinymce file from the above link and use it.
Advantages:
1. This tool will make a person, to write each and every word by its own, not just copy it from any search engine like google, bing, Yandex, etc.
2. This tool will help the person, who does not want anyone to just copy and paste the things on their blog or post.
Extras
Tinymce is the very powerful rich text editor, which we customize as per our own way. There are many options available to customize the tinymce and the reference guide is Configuration options reference
- User interface options
- Content filtering options
- Content appearance options
- Localization options
- Spelling options
- Content formatting options
- Integration options
- Image & file upload options
- URL handling options
and many other options which make the text editor advance.