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