Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 57 lines (29 sloc) 2.36 kB
31a5587 Documentation updates
Kieran Pilkington authored
1 Note: Spell checking is not tested o regularly maintained. Use with caution.
2
ff09e37 enhancement: cleaned up new spellchecking functionality, added multi …
Kieran Pilkington authored
3 = Spellchecking in TinyMCE for Rails
4
5 TinyMCE comes packed with a spellcheck plugin that relies on a server-side call to function.
6
7 If uses_tiny_mce is called in a controller, the controller will get a "spellchecker" action added to it that validates text given to it with aspell. Right now, only aspell is supported.
8
9
10 == Installing Aspell
11
12 If your distribution has Aspell in its package repositories, then use it. Some commands include (as root):
13
14 Debian/Ubuntu: apt-get install aspell aspell-en
15 openSUSE: yast2 -i aspell aspell-en
16 Mac OS X: port install aspell aspell-dict-en
17
18 If you're package repositories don't have Aspell, you'll need to compile from source. Whatever way you install it, make sure that you see the language dictionaries you plan to use when you run
19
20 aspell dicts
21
22
23 == Installing Spellchecker on TinyMCE
24
25 The SpellCheck plugin is not enabled by default in TinyMCE. To enable it, do the following.
26
27 Add the following to your uses_tiny_mce controller options declaration (edit toolbar location to suit and merge with existing settings):
28
29 :theme => 'advanced',
30 :theme_advanced_buttons3_add => %w{ spellchecker },
31 :spellchecker_languages => "+English=en",
32 :plugins => %w{ spellchecker },
33
34
35 == Customization
36
37 By default, Spellchecking calls "/controller/spellchecker". But this won't always be where the spellchecker method is accessible. But you can easily change where it should call by supplying the following setting to the options hash on the uses_tiny_mce declaration in the controller.
38
39 :spellchecker_rpc_url => '/blog/posts/spellchecker'
40
41 Also, if you want to have other languages spellchecked, make sure they're installed for Aspell to use and then add to the comma delimited value of :spellchecker_languages in the format of
42
43 FriendlyName=code
31a5587 Documentation updates
Kieran Pilkington authored
44
ff09e37 enhancement: cleaned up new spellchecking functionality, added multi …
Kieran Pilkington authored
45 So the value for English, French, German and Spanish would look like this for example
46
47 :spellchecker_languages => "+English=en,French=fr,German=de,Spanish=es",
48
49 The + sign in front of a friendly name indicates the default option for spellchecking.
50
51
52 = Credits
53
54 Spellchecking functionality created by Akhil Bansal ( http://webonrails.com/2008/08/08/configuring-tinymce-spellchecker-with-rails-application/ )
55
56 Spellchecking functionality integrated into plugin by Terry Heath
Something went wrong with that request. Please try again.