2 Copyright (c) 2003-2011, CKSource - Frederico Knabben. All rights reserved.
3 For licensing, see LICENSE.html or http://ckeditor.com/license
7 * @file Horizontal Page Break
10 // Register a plugin named "newpage".
11 CKEDITOR
.plugins
.add( 'newpage',
13 init : function( editor
)
15 editor
.addCommand( 'newpage',
17 modes
: { wysiwyg
:1, source
:1 },
19 exec : function( editor
)
22 editor
.setData( editor
.config
.newpage_html
|| '', function()
24 // Save the undo snapshot after all document changes are affected. (#4889)
25 setTimeout( function ()
27 editor
.fire( 'afterCommandExec',
32 editor
.selectionChange();
41 editor
.ui
.addButton( 'NewPage',
43 label
: editor
.lang
.newPage
,
49 * The HTML to load in the editor when the "new page" command is executed.
53 * config.newpage_html = '<p>Type your text here.</p>';