|
|
CMFSpellCheck is a Unix Plone utility to perform spell checking on Documents and other Content-types. It works with plain text and HTML and is available from the collective.
or a recent tarball from here as CMFSpellCheck.tgz
CMFSpellCheck has been designed for Plone although it does appear to work under plain CMF so may also work on other packages derived from CMF - make sure you have installed CMFFormController though...
Please read the Warning at the bottom
Either works well under Unix variants. CMFSpellCheck has not been tested on Windows servers or other platforms
ln -s /path/to/installation /path/to/zope/Products/CMFSpellCheck
In the Plone Configuration, found under Plone Setup in Plone 2,
the Add/Remove Products tool can be used to add CMFSpellCheck.
If some of your content-types have lots of action tabs, you may find the tabs wrapping onto two lines - very ugly. You can change the padding in the tabs to reduce their footprint and keep them on a single line. Add something similar to this to your ploneCustom.css:
/* Shorten Action Tabs */
.contentViews li a {
// padding: 0em 2em;
padding: 0em 0.75em;
}
Spellers like "aspell" and "ispell" provide a switch with which to specify a personal wordlist file to supplement standard dictionaries. Typically this file will contain Proper Names or local spelling variations. CMFSpellCheck provides an interface for managing such a personal list but it has a few wrinkles:
This mis-feature of Zope/OS causes "aspell" to generate an error when a wordlist is saved: "aspell" tries to save an extra file in the users home dir but fails with a permissions error. This error will be reported by CMFSpellCheck. It is expected behaviour and will not affect either spell checking or use of the wordlist
Not all Content-types use standard mechanisms for providing access to their body text. To make CMFSpellCheck as useful as possible we have compromised somehwat on how we interact with Content-types. Before making the SpellChecker available on specific Content-types, please make sure nothing will break when changes are saved back to the document.
CMFSpellCheck needs access to the unformatted body text of a document and it must be simple string data. If a Content-type has no text method, no Speller tab should be offered. You can also enforce this behaviour by changing the ActionProvider condition; by default this is just set to:
hasattr(object,'text')
Ensuring the Content-type can accept changes is a bit more difficult. The document must have an edit() method otherwise the update will fail. For Content-types which accept different formats of text (html, rest, etc), we look for a text_format attribute and try to return it with the changes. If there is no text_format attribute we just return the changed text so the Content-type must realise that no explicit format type means the format is unchanged this is the one to watch out for make sure the format is not being changed.
Content-types known to work OK
Content-types known to NOT work
Finally, CMFSpellCheck knows nothing about catalogs and expects the edit() method to look after any catalog updates.