JasonWoof Got questions, comments, patches, etc.? Contact Jason Woofenden
vanilla ckeditor-3.0
[ckeditor.git] / _source / plugins / wsc / plugin.js
diff --git a/_source/plugins/wsc/plugin.js b/_source/plugins/wsc/plugin.js
new file mode 100644 (file)
index 0000000..3ccc14b
--- /dev/null
@@ -0,0 +1,32 @@
+/*\r
+Copyright (c) 2003-2009, CKSource - Frederico Knabben. All rights reserved.\r
+For licensing, see LICENSE.html or http://ckeditor.com/license\r
+*/\r
+\r
+/**\r
+ * @file Spell checker\r
+ */\r
+\r
+// Register a plugin named "wsc".\r
+CKEDITOR.plugins.add( 'wsc',\r
+{\r
+       init : function( editor )\r
+       {\r
+               var commandName = 'checkspell';\r
+\r
+               var command = editor.addCommand( commandName, new CKEDITOR.dialogCommand( commandName ) );\r
+\r
+               // SpellChecker doesn't work in Opera and with custom domain\r
+               command.modes = { wysiwyg : ( !CKEDITOR.env.opera && document.domain == window.location.hostname ) };\r
+\r
+               editor.ui.addButton( 'SpellChecker',\r
+                       {\r
+                               label : editor.lang.spellCheck.toolbar,\r
+                               command : commandName\r
+                       });\r
+               CKEDITOR.dialog.add( commandName, this.path + 'dialogs/wsc.js' );\r
+       }\r
+});\r
+\r
+CKEDITOR.config.wsc_customerId                 = CKEDITOR.config.wsc_customerId || '1:ua3xw1-2XyGJ3-GWruD3-6OFNT1-oXcuB1-nR6Bp4-hgQHc-EcYng3-sdRXG3-NOfFk' ;\r
+CKEDITOR.config.wsc_customLoaderScript = CKEDITOR.config.wsc_customLoaderScript || null;\r