hackmdio/codimd

Allow native spell check correction of words

Open

#150 aperta il 5 ago 2016

Vedi su GitHub
 (13 commenti) (5 reazioni) (0 assegnatari)JavaScript (1038 fork)batch import
enhancementhelp wanted

Metriche repository

Star
 (8949 star)
Metriche merge PR
 (Nessuna PR mergiata in 30 g)

Descrizione

I came up with a hack that could possibly be used to enable native spell check for browsers that support it: http://codepen.io/csuwldcat/pen/mEzGmP?editors=0010

I noticed that clicks are still registered on the spans of words, so I figured I could clone the word on double click and make the clone contenteditable with spellchecking turned on. From there I mask the original, allow the user to right click the misspelled word, then reflect the change on the original text by copying the corrected text to it.

Guida contributor