Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Pages: 1
The do_spellcheck JavaScript
There is some JavaScript that I think enables some sort of spellcheck facility on certain fields of the admin panels. Shouldn’t we actually be using HTML5 spellcheck
attributes for this task nowadays – it is supported in all browsers we target and lets the OS/browser do that work natively.
It would mean an extra attribute parameter on function fInput
and function text_area
that gives us the option of turning it on for specified fields, but that is better IMHO.
One day we will move these functions to a better system such as Classes with arrays of attributes, but short-term I’m OK with adding yet another parameter.
Thoughts?
Offline
Re: The do_spellcheck JavaScript
philwareham wrote #296517:
There is some JavaScript that I think enables some sort of spellcheck facility
It enables the browser’s native spell-check facility.
Shouldn’t we actually be using HTML5
spellcheck
attributes
We do so by setting this attribute on some input and textarea elements.
A hidden preference is used to determine which fields require spellchecks. Plugins may add their own by amending the selectors in the do_spellcheck
preference (Default: #page-article #body, #page-article #title, #page-image #alt-text, #page-image #caption, #page-file #description, #page-link #link-title, #page-link #link-description
).
Thoughts?
I think it would require quite a bit of effort to refactor this functionality into fInput
and text_area
.
Offline
Re: The do_spellcheck JavaScript
Ok, thanks for the explanation Robert. Will leave as-is.
Will take it into consideration when hopefully in future we are refactoring of the HTML element functions into something more maintainable/extendable.
Offline
Pages: 1