screen_rotation
Copied to Clipboard
<!DOCTYPE html> <html> <head> <script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script> </head> <body> <div id="app"> <h3>Vue Js Disable Copy Paste</h3> <textarea type="text" v-model='value' @paste="disablePaste" @copy="disableCopy"></textarea> </div> <script type="module"> const app = new Vue({ el: "#app", data() { return { value: 'font awesome icons' } }, methods: { disablePaste(event) { event.preventDefault(); alert('Paste functionality is disabled.'); }, disableCopy(event) { event.preventDefault(); alert('Copy functionality is disabled.'); } } }) </script> <style> #app { background-color: #f5f5f5; padding: 20px; } h3 { font-size: 24px; color: #333; margin-bottom: 10px; } textarea { border: none; border-radius: 5px; padding: 10px; font-size: 16px; } textarea[disabled] { background-color: #ddd; color: #999; } </style> </body> </html>