badsyntax / jquery-spellchecker

[not maintained] A lightweight jQuery plugin that can check the spelling of text within a form field or DOM tree.
http://jquery-spellchecker.badsyntax.co
MIT License
257 stars 113 forks source link

The spell checker is not working with a contentEditable div. #60

Open BlueRyno opened 10 years ago

BlueRyno commented 10 years ago

"just use a

with contentEditable property (which is pretty well supported: http://caniuse.com/contenteditable)." - badsyntax

I've tried this method to no avail. The text that loads initially in the div can be read just fine, but even with an event that fires on blur, some words typed after page load will never be checked and some will be fine.

function typer() {
  $('#spellCheck').off('blur', speller).on('blur', speller);
}

// Bind spellchecker handler functions
spellchecker.on('check.success', function() {
  alert('There are no incorrectly spelled words!');
});

function speller()
{
  // Check the spelling when user clicks on button
  $("#check-spelling-button").off('click').on('click', function(e){
    spellchecker.check();
  });
}

vittyvardhan commented 7 years ago

I am also using jquery spellchecker it is not working mostly on editable div. Let me know if you find any break through

Thanks