Grav-plugin-admin: [FR] [Paid] Spell Check in Page Editor

Created on 11 Nov 2017  路  11Comments  路  Source: getgrav/grav-plugin-admin

Right now the admin plugin uses a WYSIWYG editor for pages, but it doesn't allow the browser's native spell-checker to work properly. Leaves you in a bit of a lurch.

Would be nice to alter the editor to allow that to work properly.

wontfix

Most helpful comment

Would this plugin be reasonable to use?

https://github.com/sparksuite/codemirror-spell-checker

All 11 comments

It's a limitation of the editor we use (CodeMirror), as it's not using a standard HTML field that supports spell check, and a JS solution would require a HUGE dictionary database in potentially every language.

BTW, this could be solved with an alternate editor.

Can we disable the wysiwyg editor? I'd take a spell check over wysiwyg any day.

I've had some success with just editing stuff directly in -gulp- SSH. Vim has spellcheck that does well enough and I've been meaning to learn how to use it. ;)

Would this plugin be reasonable to use?

https://github.com/sparksuite/codemirror-spell-checker

Has anyone managed to integrate this plugin with Grav? If so, any tips on how to do this?

Do you have any news or have you started the project since the last return ?

I feel like it would probably be done as a build of CM with the spell checker included, and that comes with all the same baggage as other Grav includes (e.g. security reviews). There's also the matter of size: the owner of CM didn't want to bundle the spellcheck by default because it's so large (sauce). Typo.js (and the CM Spell Checker link above) add ~750kb and that's _just_ for en-us. Not commenting if that's a sufficient reason not to do it, just relaying info into this thread. :)

EDIT: Now that I look, the size issue was raised in 2013, so...maybe things've changed since then?

Would this plugin be reasonable to use?

https://github.com/sparksuite/codemirror-spell-checker

What one has managed to implement ?

So what I did to "solve" the problem, was to add: 'spellcheck': 'true', 'inputStyle': 'contenteditable', to user/plugins/admin/themes/grav/templates/forms/fields/codemirror/codemirror.html.twig and to user/plugins/admin/themes/grav/templates/forms/fields/editor/editor.html.twig and on at least Firefox this works perfectly (at least for my needs). I'm not a website guru, so don't take my word for it. But it seems to be working fine, something to consider to implement in the next version of Admin?

CC @w00fz @rhukster

Was this page helpful?
0 / 5 - 0 ratings

Related issues

fourroses666 picture fourroses666  路  4Comments

coolemur picture coolemur  路  3Comments

dimayakovlev picture dimayakovlev  路  5Comments

Genenenenaam picture Genenenenaam  路  5Comments

illycz picture illycz  路  5Comments