javascript - Allow copy, paste and cut in textarea (Building keybord) -


i building keyboard want allow users copy, paste, cut keyboard short keys ctrl+c, ctrl+v ctrl+x. works when copy, paste or cut text in text area. later on can not type more text or edit current pasted text until refresh page.

<textarea id="write"></textarea> 

jquery code:

$write = $('#write'); $write.keydown(function (event) {   if(!event.ctrlkey) {     event.preventdefault();     $write.html($write.html() + ' tmp');    }  }); 

it's working when paste or cut text textarea after not work. check console , see text adding in textarea tags not shown in textarea. here working link http://projects.imube.com/keyboard/

keyboard


Comments

Popular posts from this blog

php - How to display all orders for a single product showing the most recent first? Woocommerce -

asp.net - How to correctly use QUERY_STRING in ISAPI rewrite? -

angularjs - How restrict admin panel using in backend laravel and admin panel on angular? -