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
blog_logic-0.7.3 public/javascripts/ckeditor/_source/plugins/save/plugin.js
blog_logic-0.7.2 public/javascripts/ckeditor/_source/plugins/save/plugin.js
editorial_logic-1.1.4 public/javascripts/ckeditor/_source/plugins/save/plugin.js
site_logic-1.6.8 public/javascripts/ckeditor/_source/plugins/save/plugin.js
editorial_logic-1.1.3 public/javascripts/ckeditor/_source/plugins/save/plugin.js
editorial_logic-1.1.2 public/javascripts/ckeditor/_source/plugins/save/plugin.js
site_logic-1.6.7 public/javascripts/ckeditor/_source/plugins/save/plugin.js
site_logic-1.6.6 public/javascripts/ckeditor/_source/plugins/save/plugin.js
editorial_logic-1.1.1 public/javascripts/ckeditor/_source/plugins/save/plugin.js
editorial_logic-1.1.0 public/javascripts/ckeditor/_source/plugins/save/plugin.js
radiant-ck_editor_filter-extension-0.2.0 public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/save/plugin.js
radiant-ck_editor_filter-extension-0.1.1 public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/save/plugin.js
dust-ckeditor-3.5.0 lib/generators/ckeditor/base/templates/ckeditor/_source/plugins/save/plugin.js
hifi-ckeditor-3.5.2 lib/generators/ckeditor/base/templates/ckeditor/_source/plugins/save/plugin.js
hifi-ckeditor-3.5.1 lib/generators/ckeditor/base/templates/ckeditor/_source/plugins/save/plugin.js
artemk-ckeditor-3.5.5 generators/ckeditor_install/templates/ckeditor/_source/plugins/save/plugin.js
ckeditor-jess-3.4.3 generators/ckeditor_install/templates/ckeditor/_source/plugins/save/plugin.js
ckeditor-3.5.0 lib/generators/ckeditor/base/templates/ckeditor/_source/plugins/save/plugin.js
artemk-ckeditor-3.5.4 generators/ckeditor_install/templates/ckeditor/_source/plugins/save/plugin.js
artemk-ckeditor-3.4.4 generators/ckeditor_install/templates/ckeditor/_source/plugins/save/plugin.js