Tags:
spelling1Add my vote for this tag create new tag
, view all tags

SpellerPagesPlugin

Spell checker based on Perl/JavaScript frontent to GNU Aspell and spellerpages

This plugin provides a JavaScript and perl based frontend to GNU Aspell allowing users to check the spelling of the edit textbox before saving.

The plugin is based on the perl version of spellerpages but hacked to turn it into a TWiki plugin. Version 0.5.1 of spellerpages is packaged with the plugin.

Plugin Settings

Plugin settings are stored as preferences variables. To reference a plugin setting write %<plugin>_<setting>%, i.e. %INTERWIKIPLUGIN_SHORTDESCRIPTION%

  • Set SHORTDESCRIPTION = Spell checker based on Perl/JavaScript frontent to GNU Aspell and spellerpages

  • Set DEBUG = 0
    • Debug plugin: (See output in data/debug.txt).
  • Set ASPELL_CMD = aspell
    • Spelling program to run. Use /path/to/aspell if the executable is not in the path.
  • Set ASPELL_OPTS = -a --lang=en_GB --encoding=utf-8 -C -H
    • Options to pass to the spelling program. See aspell documentation for more.
      -a ispell -a compatibility mode (?) Required
      --lang=en_GB language code. Try also en_US
      --encoding=utf-8 encoding to expect data to be in.
      -C consider run-together words legal (useful for WikiWords).
      -H enter Html/Sgml mode (useful if there is 'real' html in the source).
  • Set FORM_TEXTAREA = main.text
    • Javascript identifier of the textarea in edit template to spell.
  • #Set FORM_TEXTAREA = EditFormular.text
    • For Nat skin users.
  • Set AUTOSPELL = off
    • Automatically check spelling (options are off, preview, save, both)
    • not implemented

If these preferences are set in TWikiPreferences or WebPreferences and removed from here, then they can be overridden by preferences defined in a user's home topic.

Plugin Installation Instructions

Note: You do not need to install anything on the browser to use this plugin. The following instructions are for the administrator who installs the plugin on the server where TWiki is running.

  • Install GNU Aspell.
  • Download the ZIP file from the Plugin web (see below)
  • Unzip SpellerPagesPlugin.zip in your twiki installation directory. Content:
    File: Description:
    bin/spellerpages Plugin script
    data/TWiki/SpellerPagesPlugin.txt Plugin topic
    lib/TWiki/Plugins/SpellerPagesPlugin.pm Plugin Perl module
    pub/TWiki/SpellerPagesPlugin/blank.html spellerpages-0.5.1
    pub/TWiki/SpellerPagesPlugin/controls.html spellerpages-0.5.1
    pub/TWiki/SpellerPagesPlugin/controlWindow.js spellerpages-0.5.1
    pub/TWiki/SpellerPagesPlugin/spellchecker.html spellerpages-0.5.1
    pub/TWiki/SpellerPagesPlugin/spellerStyle.css spellerpages-0.5.1
    pub/TWiki/SpellerPagesPlugin/wordWindow.js spellerpages-0.5.1
  • Edit your edit template (in the templates directory). The actual file name to edit will depend on the skin you are using, but will usually be edit.pattern.tmpl or edit.tmpl or similar.
    • Include necessary JavaScript in template. Add the following line to the script block so that it reads:
      %TMPL:DEF{"script"}%
      <!-- INCLUDEJSSPELLERPAGES -->
    • Create a 'Check spelling' button. Add something like the following to the topicaction block:
      <input type="button" value="Spell" onClick="openSpellChecker();" />

For example, my edit.pattern.tmpl now contains the following:

<td class="twikiAddCol">
  <input type="button" class="twikiSubmit twikiTertiary" value="Spell" onClick="openSpellChecker();" />
  <input type="submit" class="twikiSubmit twikiTertiary" name="action" id="preview" value="Preview" />
  <label accesskey="p" for="preview"></label>
</td>

Plugin Info

Plugin Author: TWiki:Main.MagnusLewisSmith
Plugin Version: 13 Oct 2005 (V1.001)
Change History:  
23 Jan 2006: V1.002 Changed to ignore TWiki %VARIABLE% references; fixed some typos in comments
13 Oct 2005: V1.001 Added FORM_TEXTAREA preference.
12 Oct 2005: Initial version
TWiki Dependency: $TWiki::Plugins::VERSION 1.024
CPAN Dependencies: none
Other Dependencies: none
Perl Version: 5.005
License: GPL (GNU General Public License)
TWiki:Plugins/Benchmark: GoodStyle nn%, FormattedSearch nn%, SpellerPagesPlugin nn%
Plugin Home: http://TWiki.org/cgi-bin/view/Plugins/SpellerPagesPlugin
Feedback: http://TWiki.org/cgi-bin/view/Plugins/SpellerPagesPluginDev
Appraisal: http://TWiki.org/cgi-bin/view/Plugins/SpellerPagesPluginAppraisal

Related Topics: TWikiPreferences, TWikiPlugins

-- TWiki:Main.MagnusLewisSmith - 13 Oct 2005

Topic attachments
I Attachment History Action Size Date Who Comment
Compressed Zip archivezip SpellerPagesPlugin.zip r3 r2 r1 manage 17.9 K 2006-02-08 - 07:29 PeterThoeny Spellcheck plugin, version 23 Jan 2006 (V1.002)
Edit | Attach | Watch | Print version | History: r7 < r6 < r5 < r4 < r3 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r7 - 2006-02-13 - PeterLohmann
 
  • Learn about TWiki  
  • Download TWiki
This site is powered by the TWiki collaboration platform Powered by Perl Hosted by OICcam.com Ideas, requests, problems regarding TWiki? Send feedback. Ask community in the support forum.
Copyright © 1999-2017 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.