Sha256: df8aa215e3dba474a38261f9b69c2b59670602785a56045832d939aa70a35536

Contents?: true

Size: 1.06 KB

Versions: 93

Compression:

Stored size: 1.06 KB

Contents

/*
Copyright (c) 2003-2010, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/

/**
 * @fileSave plugin.
 */

(function()
{
	var saveCmd =
	{
		modes : { wysiwyg:1, source:1 },

		exec : function( editor )
		{
			var $form = editor.element.$.form;

			if ( $form )
			{
				try
				{
					$form.submit();
				}
				catch( e )
				{
					// If there's a button named "submit" then the form.submit
					// function is masked and can't be called in IE/FF, so we
					// call the click() method of that button.
					if ( $form.submit.click )
						$form.submit.click();
				}
			}
		}
	};

	var pluginName = 'save';

	// Register a plugin named "save".
	CKEDITOR.plugins.add( pluginName,
	{
		init : function( editor )
		{
			var command = editor.addCommand( pluginName, saveCmd );
			command.modes = { wysiwyg : !!( editor.element.$.form ) };

			editor.ui.addButton( 'Save',
				{
					label : editor.lang.save,
					command : pluginName
				});
		}
	});
})();

Version data entries

93 entries across 93 versions & 11 rubygems

Version Path
ppc_logic-0.8.0 public/javascripts/ckeditor/_source/plugins/save/plugin.js
editorial_logic-1.4.1 public/javascripts/ckeditor/_source/plugins/save/plugin.js
blog_logic-1.4.0 public/javascripts/ckeditor/_source/plugins/save/plugin.js
editorial_logic-1.4.0 public/javascripts/ckeditor/_source/plugins/save/plugin.js
blog_logic-1.3.1 public/javascripts/ckeditor/_source/plugins/save/plugin.js
blog_logic-1.3.0 public/javascripts/ckeditor/_source/plugins/save/plugin.js
blog_logic-1.2.4 public/javascripts/ckeditor/_source/plugins/save/plugin.js
site_logic-1.9.2 public/javascripts/ckeditor/_source/plugins/save/plugin.js
blog_logic-1.2.3 public/javascripts/ckeditor/_source/plugins/save/plugin.js
blog_logic-1.2.2 public/javascripts/ckeditor/_source/plugins/save/plugin.js
blog_logic-1.2.1 public/javascripts/ckeditor/_source/plugins/save/plugin.js
editorial_logic-1.3.3 public/javascripts/ckeditor/_source/plugins/save/plugin.js
site_logic-1.9.1 public/javascripts/ckeditor/_source/plugins/save/plugin.js
blog_logic-1.2.0 public/javascripts/ckeditor/_source/plugins/save/plugin.js
blog_logic-1.1.9 public/javascripts/ckeditor/_source/plugins/save/plugin.js
site_logic-1.9.0 public/javascripts/ckeditor/_source/plugins/save/plugin.js
editorial_logic-1.3.2 public/javascripts/ckeditor/_source/plugins/save/plugin.js
editorial_logic-1.3.1 public/javascripts/ckeditor/_source/plugins/save/plugin.js
site_logic-1.8.0 public/javascripts/ckeditor/_source/plugins/save/plugin.js
site_logic-1.7.1 public/javascripts/ckeditor/_source/plugins/save/plugin.js