Index: /CKEditor/branches/prototype/_source/core/config.js
===================================================================
--- /CKEditor/branches/prototype/_source/core/config.js	(revision 2871)
+++ /CKEditor/branches/prototype/_source/core/config.js	(revision 2872)
@@ -162,5 +162,5 @@
 	 * config.plugins = 'elementspath,toolbar,wysiwygarea';
 	 */
-	plugins : 'basicstyles,button,dialog,elementspath,horizontalrule,htmldataprocessor,keystrokes,removeformat,smiley,link,sourcearea,tab,toolbar,wysiwygarea,forms,image,find,table,specialchar,flash,print',
+	plugins : 'basicstyles,button,dialog,elementspath,horizontalrule,htmldataprocessor,keystrokes,removeformat,smiley,link,sourcearea,tab,toolbar,wysiwygarea,forms,image,find,table,specialchar,flash,print,pagebreak',
 
 	/**
Index: /CKEditor/branches/prototype/_source/lang/en.js
===================================================================
--- /CKEditor/branches/prototype/_source/lang/en.js	(revision 2871)
+++ /CKEditor/branches/prototype/_source/lang/en.js	(revision 2872)
@@ -56,4 +56,5 @@
 	superscript		: 'Superscript',
 	horizontalrule	: 'Insert Horizontal Line',
+	pagebreak		: 'Insert Page Break',
 	unlink			: 'Unlink',
 
Index: /CKEditor/branches/prototype/_source/plugins/fakeobjects/plugin.js
===================================================================
--- /CKEditor/branches/prototype/_source/plugins/fakeobjects/plugin.js	(revision 2871)
+++ /CKEditor/branches/prototype/_source/plugins/fakeobjects/plugin.js	(revision 2872)
@@ -49,4 +49,18 @@
 							},
 							cssClass : 'anchor',
+							priority : 10
+						},
+						{
+							match : function( nodeName, attributes )
+							{
+								if ( nodeName == 'div' && attributes.style && attributes.style.pageBreakAfter == 'always' )
+									if ( attributes.firstChild )
+									{
+										var element = new CKEDITOR.dom.element( attributes.firstChild );
+										return ( element && element.getName() == 'span');
+									}
+								return false;
+							},
+							cssClass : 'pagebreak',
 							priority : 10
 						},
Index: /CKEditor/branches/prototype/_source/plugins/pagebreak/plugin.js
===================================================================
--- /CKEditor/branches/prototype/_source/plugins/pagebreak/plugin.js	(revision 2872)
+++ /CKEditor/branches/prototype/_source/plugins/pagebreak/plugin.js	(revision 2872)
@@ -0,0 +1,73 @@
+/*
+ * CKEditor - The text editor for Internet - http://ckeditor.com
+ * Copyright (C) 2003-2008 Frederico Caldeira Knabben
+ *
+ * == BEGIN LICENSE ==
+ *
+ * Licensed under the terms of any of the following licenses at your
+ * choice:
+ *
+ *  - GNU General Public License Version 2 or later (the "GPL")
+ *    http://www.gnu.org/licenses/gpl.html
+ *
+ *  - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
+ *    http://www.gnu.org/licenses/lgpl.html
+ *
+ *  - Mozilla Public License Version 1.1 or later (the "MPL")
+ *    http://www.mozilla.org/MPL/MPL-1.1.html
+ *
+ * == END LICENSE ==
+ */
+
+/**
+ * @file Horizontal Page Break
+ */
+
+// Register a plugin named "pagebreak".
+CKEDITOR.plugins.add( 'pagebreak',
+{
+	init : function( editor, pluginPath )
+	{	
+		editor.addCommand( 'pagebreak', CKEDITOR.plugins.pagebreak );
+		editor.ui.addButton( 'PageBreak',
+			{
+				label : editor.lang.pagebreak,
+				command : 'pagebreak'
+			});
+	},
+	requires : [ 'fakeobjects' ]
+});
+
+CKEDITOR.plugins.pagebreak =
+{
+	limitPage : 2,	// only 1 pagebreak
+	pageBreakObject : function( editor, getProtected )
+	{
+		var breakObject = CKEDITOR.dom.element.createFromHtml( '<div style="page-break-after: always;"><span style="display: none;">&nbsp;</span></div>' );
+
+		if ( getProtected )
+			return CKEDITOR.plugins.fakeobjects.protectElement( breakObject );
+		else
+			return breakObject;
+	},
+	removeOldBreaks : function( editor, limit )
+	{
+		// get all elements in CK document
+		var elements = editor.document.$.getElementsByTagName( 'img' );
+		// check every element for childNodes
+		var count = 1;
+		for( var i = 0; i < elements.length; i++ )
+		{
+			element = elements.item( i );
+			if ( element.getAttribute( '_cke_protected_html' ) && element.getAttribute( '_cke_real_element_type' ) == "pagebreak" )
+				if ( ++count >= limit )
+					element.parentNode.removeChild( element );
+		}
+	},
+	exec : function( editor )
+	{
+		var element = CKEDITOR.plugins.pagebreak.pageBreakObject( editor, true );
+		CKEDITOR.plugins.pagebreak.removeOldBreaks( editor, CKEDITOR.plugins.pagebreak.limitPage );
+		editor.insertElement( element );
+	}
+};
Index: /CKEditor/branches/prototype/_source/plugins/toolbar/plugin.js
===================================================================
--- /CKEditor/branches/prototype/_source/plugins/toolbar/plugin.js	(revision 2871)
+++ /CKEditor/branches/prototype/_source/plugins/toolbar/plugin.js	(revision 2872)
@@ -222,7 +222,7 @@
 CKEDITOR.config.toolbar =
 [
-	[ 'Source', '-', 'Bold', 'Italic', 'Underline', 'Strike', '-', 'Subscript', 'Superscript', '-', 'Print' ,'Find','Replace','-',
+	[ 'Source', '-', 'Bold', 'Italic', 'Underline', 'Strike', '-', 'Subscript', 'Superscript', '-', 'Print', 'Find', 'Replace', '-',
 	'SelectAll', 'RemoveFormat', '-',
-	'Link', 'Unlink', 'Anchor', 'Image', 'Flash', 'Table', 'Smiley', 'HorizontalRule', 'SpecialChar', '-',
+	'Link', 'Unlink', 'Anchor', 'Image', 'Flash', 'Table', 'Smiley', 'HorizontalRule', 'SpecialChar', 'PageBreak', '-',
 	'Form', 'Checkbox', 'Radio', 'TextField', 'Textarea', 'Select', 'Button', 'ImageButton', 'HiddenField' ]
 ];
Index: /CKEditor/branches/prototype/_source/skins/default/toolbar.css
===================================================================
--- /CKEditor/branches/prototype/_source/skins/default/toolbar.css	(revision 2871)
+++ /CKEditor/branches/prototype/_source/skins/default/toolbar.css	(revision 2872)
@@ -258,4 +258,9 @@
 }
 
+.cke_skin_default a.cke_button_pagebreak .cke_icon
+{
+	background-position: 0 -672px;
+}
+
 .cke_skin_default a.cke_button_print .cke_icon
 {
Index: /CKEditor/branches/prototype/contents.css
===================================================================
--- /CKEditor/branches/prototype/contents.css	(revision 2871)
+++ /CKEditor/branches/prototype/contents.css	(revision 2872)
@@ -55,2 +55,9 @@
 	height: 18px;
 }
+
+img.cke_fakeobject.pagebreak
+{
+	background-image: url(images/pagebreak.gif);
+	width: 100%;
+	height: 7px;
+}
