2 Copyright (c) 2003-2011, CKSource - Frederico Knabben. All rights reserved.
\r
3 For licensing, see LICENSE.html or http://ckeditor.com/license
\r
14 modes : { wysiwyg:1, source:1 },
\r
16 exec : function( editor )
\r
18 var $form = editor.element.$.form;
\r
28 // If there's a button named "submit" then the form.submit
\r
29 // function is masked and can't be called in IE/FF, so we
\r
30 // call the click() method of that button.
\r
31 if ( $form.submit.click )
\r
32 $form.submit.click();
\r
38 var pluginName = 'save';
\r
40 // Register a plugin named "save".
\r
41 CKEDITOR.plugins.add( pluginName,
\r
43 init : function( editor )
\r
45 var command = editor.addCommand( pluginName, saveCmd );
\r
46 command.modes = { wysiwyg : !!( editor.element.$.form ) };
\r
48 editor.ui.addButton( 'Save',
\r
50 label : editor.lang.save,
\r
51 command : pluginName
\r