Sha256: a4c767f9d62b75979800e4d82a8bdcde71dfcfce459cbe495791e07f3f849b00

Contents?: true

Size: 1.21 KB

Versions: 7

Compression:

Stored size: 1.21 KB

Contents

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

/**
 * @file Horizontal Page Break
 */

// Register a plugin named "newpage".
CKEDITOR.plugins.add( 'newpage',
{
	init : function( editor )
	{
		editor.addCommand( 'newpage',
			{
				modes : { wysiwyg:1, source:1 },

				exec : function( editor )
				{
					var command = this;
					editor.setData( editor.config.newpage_html || '', function()
					{
						// Save the undo snapshot after all document changes are affected. (#4889)
						setTimeout( function ()
						{
							editor.fire( 'afterCommandExec',
							{
								name: command.name,
								command: command
							} );
							editor.selectionChange();

						}, 200 );
					} );
					editor.focus();
				},
				async : true
			});

		editor.ui.addButton( 'NewPage',
			{
				label : editor.lang.newPage,
				command : 'newpage'
			});
	}
});
/**
 * The HTML to load in the editor when the "new page" command is executed.
 * @name CKEDITOR.config.newpage_html
 * @type String
 * @default ''
 * @example
 * config.newpage_html = '<p>Type your text here.</p>';
 */

Version data entries

7 entries across 7 versions & 4 rubygems

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