2009-10-10 00:15:12 -07:00
|
|
|
|
/*
|
2011-05-16 20:19:32 -07:00
|
|
|
|
Copyright (c) 2003-2011, CKSource - Frederico Knabben. All rights reserved.
|
2009-10-10 00:15:12 -07:00
|
|
|
|
For licensing, see LICENSE.html or http://ckeditor.com/license
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* @file Spell checker
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
// Register a plugin named "wsc".
|
|
|
|
|
|
CKEDITOR.plugins.add( 'wsc',
|
|
|
|
|
|
{
|
2010-04-26 18:15:27 -07:00
|
|
|
|
requires : [ 'dialog' ],
|
2009-10-10 00:15:12 -07:00
|
|
|
|
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
|
2011-05-16 20:19:32 -07:00
|
|
|
|
command.modes = { wysiwyg : ( !CKEDITOR.env.opera && !CKEDITOR.env.air && document.domain == window.location.hostname ) };
|
2009-10-10 00:15:12 -07:00
|
|
|
|
|
|
|
|
|
|
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;
|