Sha256: 20c2c95aac2e101462af3dcf2ca699c2a59813176d5e4218fb6f502dde192184

Contents?: true

Size: 1.07 KB

Versions: 7

Compression:

Stored size: 1.07 KB

Contents

/*
Copyright (c) 2003-2012, 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 },
		readOnly : 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

7 entries across 7 versions & 4 rubygems

Version Path
rich-1.3.1 vendor/assets/ckeditor/ckeditor/_source/plugins/save/plugin.js
rich-1.3.0 vendor/assets/ckeditor/ckeditor/_source/plugins/save/plugin.js
rich-1.2.0 vendor/assets/ckeditor/ckeditor/_source/plugins/save/plugin.js
ckeditor-rails-0.0.5 vendor/assets/ckeditor/ckeditor/_source/plugins/save/plugin.js
refinerycms-ckeditor-0.2.0 app/assets/javascripts/ckeditor/_source/plugins/save/plugin.js
rich-1.1.0 vendor/assets/ckeditor/ckeditor/_source/plugins/save/plugin.js
radiant-ck_editor_filter-extension-0.2.6 public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/save/plugin.js