Published on 08/28/2019
Published by amit
Enabling Spellcheker in Awesome
Simple put this code in your awesome js app.
To use it enable use Shfit + Z
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
<script type=spa/axn axn='core.run_script' data-safe_id="[app.safe_id/]"> $(document).keydown(function(e) { if (e.shiftKey) { if (e.keyCode == 90) { console.log(document.body.contentEditable); if(document.body.contentEditable=='true'){ alert('Spelling Check OFF'); document.body.contentEditable = 'false'; document.designMode='off'; e.preventDefault(); }else{ alert('Spelling Check ON'); document.body.contentEditable = 'true'; document.designMode='on'; e.preventDefault(); } } } }); </script> |