codimd
codimd copied to clipboard
Allow native spell check correction of words
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.
@csuwildcat Thank you! I tested Chrome 52 on my Mac, but the suggestion still not working. Firefox always works so that might be Chrome's setting or issue.
But this might take times to hack into CodeMirror to figure out how to. Please be patient. Thanks again.
Oh another thing is the cursor will jump to the front of the word when you double clicking it. It would be nice if you could inspect how to avoid that :smile:
I had only spent a few minutes on the first hack, so I bet I can figure out the other issues you mentioned. Probably can take a look at the end of the week, I am at a work offsite for the next few days.
On Sun, Aug 7, 2016 at 8:02 PM, Max Wu [email protected] wrote:
Oh another thing is the cursor will jump to the front of the word when you double clicking it. It would be nice if you could inspect how to avoid that 😄
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/hackmdio/hackmd/issues/150#issuecomment-238132073, or mute the thread https://github.com/notifications/unsubscribe-auth/AAICyiSiDEgTmDdfurC9JHPj-umTk99Pks5qdpxVgaJpZM4JeC5j .
refer to https://github.com/codemirror/CodeMirror/pull/4113 and https://gist.github.com/kofifus/4b2f79cadc871a29439d919692099406
@csuwildcat did you make any progress with that?
I think this is one of the most important issues, now that HackMD is used by a wider audience.
Hey, I ended up here, after looking into HackMD compatibility with Grammarly. I recently discovered HackMD and am loving it.
Is there any work being done towards this issue? Any place where we can vote for issues to be prioritized?
@kinetifex sadly, there is currently no way to put grammarly support into HackMD. The way the editor framework codemirror composes the editing section makes it hard, to impossible for Grammarly to hook into this. And as Grammarly is not open source, it can't be modified to work with some kind of codemirror addons.
@SISheogorath bummer. Thanks for the quick response.
You're welcome, even when the answer you got probably doesn't make you really happy :)
Is there a way to spell check currently? An in-editor implementation would be the next best thing and would be very helpful.
@PenguinOwl, there is:
The check mark in the lower toolbar enables spell checking. But it's far from being perfect. It tells you that something is wrong, or unknown, but doesn't suggest how to correct it, which makes it way less useful than it should be. Also it only supports english language, so if anyone want to put work into this, it would be very, very welcome :+1:
UP. Is there any way I can use native spell check to let my browser suggest a corrections?