codimd icon indicating copy to clipboard operation
codimd copied to clipboard

Allow native spell check correction of words

Open csuwildcat opened this issue 8 years ago • 13 comments

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 avatar Aug 05 '16 20:08 csuwildcat

@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.

jackycute avatar Aug 08 '16 03:08 jackycute

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:

jackycute avatar Aug 08 '16 03:08 jackycute

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 .

csuwildcat avatar Aug 08 '16 06:08 csuwildcat

refer to https://github.com/codemirror/CodeMirror/pull/4113 and https://gist.github.com/kofifus/4b2f79cadc871a29439d919692099406

jackycute avatar Oct 10 '16 06:10 jackycute

@csuwildcat did you make any progress with that?

ccoenen avatar Aug 02 '17 21:08 ccoenen

I think this is one of the most important issues, now that HackMD is used by a wider audience.

ccoenen avatar Oct 06 '17 20:10 ccoenen

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 avatar Mar 12 '18 16:03 kinetifex

@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 avatar Mar 12 '18 17:03 SISheogorath

@SISheogorath bummer. Thanks for the quick response.

kinetifex avatar Mar 12 '18 18:03 kinetifex

You're welcome, even when the answer you got probably doesn't make you really happy :)

SISheogorath avatar Mar 12 '18 18:03 SISheogorath

Is there a way to spell check currently? An in-editor implementation would be the next best thing and would be very helpful.

PenguinOwl avatar Feb 14 '19 21:02 PenguinOwl

@PenguinOwl, there is:

Spellcheck check mark in the editor toolbar

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:

SISheogorath avatar Feb 14 '19 22:02 SISheogorath

UP. Is there any way I can use native spell check to let my browser suggest a corrections?

robert-zaremba avatar Jan 25 '23 17:01 robert-zaremba