JasonWoof Got questions, comments, patches, etc.? Contact Jason Woofenden
3ccc14b6341d63bc656d420eef21878d854b80b5
[ckeditor.git] / _source / plugins / wsc / plugin.js
1 /*\r
2 Copyright (c) 2003-2009, CKSource - Frederico Knabben. All rights reserved.\r
3 For licensing, see LICENSE.html or http://ckeditor.com/license\r
4 */\r
5 \r
6 /**\r
7  * @file Spell checker\r
8  */\r
9 \r
10 // Register a plugin named "wsc".\r
11 CKEDITOR.plugins.add( 'wsc',\r
12 {\r
13         init : function( editor )\r
14         {\r
15                 var commandName = 'checkspell';\r
16 \r
17                 var command = editor.addCommand( commandName, new CKEDITOR.dialogCommand( commandName ) );\r
18 \r
19                 // SpellChecker doesn't work in Opera and with custom domain\r
20                 command.modes = { wysiwyg : ( !CKEDITOR.env.opera && document.domain == window.location.hostname ) };\r
21 \r
22                 editor.ui.addButton( 'SpellChecker',\r
23                         {\r
24                                 label : editor.lang.spellCheck.toolbar,\r
25                                 command : commandName\r
26                         });\r
27                 CKEDITOR.dialog.add( commandName, this.path + 'dialogs/wsc.js' );\r
28         }\r
29 });\r
30 \r
31 CKEDITOR.config.wsc_customerId                  = CKEDITOR.config.wsc_customerId || '1:ua3xw1-2XyGJ3-GWruD3-6OFNT1-oXcuB1-nR6Bp4-hgQHc-EcYng3-sdRXG3-NOfFk' ;\r
32 CKEDITOR.config.wsc_customLoaderScript  = CKEDITOR.config.wsc_customLoaderScript || null;\r