X-Git-Url: https://scm.cri.minesparis.psl.eu/git/ckeditor.git/blobdiff_plain/256592bf803e851aa7fc953e08a6e9e58d970f8c..871bad8291b6dbc29d489d95d185458caab25158:/skins/ckeditor/_source/plugins/wsc/plugin.js diff --git a/skins/ckeditor/_source/plugins/wsc/plugin.js b/skins/ckeditor/_source/plugins/wsc/plugin.js new file mode 100644 index 0000000..3566dc9 --- /dev/null +++ b/skins/ckeditor/_source/plugins/wsc/plugin.js @@ -0,0 +1,33 @@ +/* +Copyright (c) 2003-2011, CKSource - Frederico Knabben. All rights reserved. +For licensing, see LICENSE.html or http://ckeditor.com/license +*/ + +/** + * @file Spell checker + */ + +// Register a plugin named "wsc". +CKEDITOR.plugins.add( 'wsc', +{ + requires : [ 'dialog' ], + init : function( editor ) + { + var commandName = 'checkspell'; + + var command = editor.addCommand( commandName, new CKEDITOR.dialogCommand( commandName ) ); + + // SpellChecker doesn't work in Opera and with custom domain + command.modes = { wysiwyg : ( !CKEDITOR.env.opera && !CKEDITOR.env.air && document.domain == window.location.hostname ) }; + + editor.ui.addButton( 'SpellChecker', + { + label : editor.lang.spellCheck.toolbar, + command : commandName + }); + CKEDITOR.dialog.add( commandName, this.path + 'dialogs/wsc.js' ); + } +}); + +CKEDITOR.config.wsc_customerId = CKEDITOR.config.wsc_customerId || '1:ua3xw1-2XyGJ3-GWruD3-6OFNT1-oXcuB1-nR6Bp4-hgQHc-EcYng3-sdRXG3-NOfFk' ; +CKEDITOR.config.wsc_customLoaderScript = CKEDITOR.config.wsc_customLoaderScript || null;