I am developing a spellchecker for the Indian language. So far, spell checking is able to find misspelled words.
I use a div editable for content for this purpose. So now I need to show sentences for misspelled words whenever the user right-clicks or chooses the wrong sentence of words, should be replaced with misspelled words, or just ignore it.
Iam having a sentence generator algorithm in perl. I just need to link with javascript . I'm stuck on how to show sentences (draw a menu with the cursor). I found the code after a google search. But could not go further.
<script type="text/javascript"> if (document.addEventListener) { document.addEventListener('contextmenu', function(e) { alert("You've tried to open context menu"); //here you draw your own menu e.preventDefault(); }, false); } else { document.attachEvent('oncontextmenu', function() { alert("You've tried to open context menu"); window.event.returnValue = false; }); } </script>
javascript html right-click spell-checking
Nagaraju
source share