After the Deadline is an open source software service that checks spelling, style, and grammar. This package contains an AtD TinyMCE Plugin and an example for using After the Deadline with TinyMCE.
atd_rpc_id
Your API key
atd_rpc_url
the URL to post to, a proxy PHP script is included. This will redirect all calls to http://service.afterthedeadline.com/ Use: htp://yourserver.com/path/to/AtD/proxy.php?url= for this. Note: the '?url=' portion is expected by the included proxy.php script
atd_css_url
the URL of the content.css file. Edit this file to change the appearance of AtD errors.
If you've unzipped this archive on a webserver with PHP installed, you should be able to access demo.html directly and see everything work.
You can download the After the Deadline server from open.afterthedeadline.com and serve your own requests. If you go this route, modify server/proxy.php to connect to your AtD host. All the other steps are the same.
After the Deadline lets you specify a list of phrases it should not highlight. This is the AtD equivalent of add to dictionary functionality in other programs.
You can hardcode these values in the atd_ignore_strings
value in TinyMCE init.
The format is a comma separated list of phrases. (See example below for more).
Users can choose to ignore phrases by selecting Ignore always when clicking
a highlighted phrase. You have to enable this feature for the Ignore always
menu to show up. Do so by setting the atd_ignore_enable
to the string "true"
in TinyMCE init.
If you see Ignore all when clicking an error then this feature is disabled.
There is a caveat to this client side ignore capability. You get to create the
user interface for unignoring rules. The phrases are stored in a cookie named
atd_ignore
. This cookie was created with:
tinymce.util.Cookie.setHash("atd_ignore", ...);
The format of the cookie is some+phrase=1&someWord=1&.... See the TinyMCE API for tinymce.util.Cookie.
support/atdphrases.js and support/unignore.html are included in this archive to assist you.
The best option is to manage the ignored phrases preference on your server. We do this in our WordPress
plugin. When we generate the TinyMCE init we pull the user's ignore preferences from our database and populate the atd_ignore_strings
value with them.
The AtD TinyMCE plugin can be configured to make an AJAX call to your server when a user selects Ignore Always. To enable this set atd_ignore_rpc_url
in the
TinyMCE init. When set AtD will do a GET call to this URL with the ignored phrase&key=api key appended.
This TinyMCE plugin only shows grammar, spelling, and misused word errors by default. All other categories of errors are filtered and you must explicitly
enable them in the TinyMCE init parameters by setting the atd_show_types
variable.
atd_show_types: "Bias Language,Cliches,Complex Expression,Diacritical Marks,Double Negatives,Hidden Verbs,Jargon Language,Passive voice,Phrases to Avoid,Redundant Expression",
You may omit any of these categories. Note that categories are separated by commas with no whitespace. The category names are case sensitive and yes, voice is lowercase in Passive voice.
See the change log.
Get support from the atd-developers mailing list.
This code is a hack on the spellcheck plugin from Moxiecode. Thanks for the hard work guys.
LGPL