JasonWoof Got questions, comments, patches, etc.? Contact Jason Woofenden
vanilla ckeditor-3.1.1
[ckeditor.git] / _source / plugins / pagebreak / plugin.js
index eaee4a6..3a1c642 100644 (file)
@@ -1,5 +1,5 @@
 /*\r
-Copyright (c) 2003-2009, CKSource - Frederico Knabben. All rights reserved.\r
+Copyright (c) 2003-2010, CKSource - Frederico Knabben. All rights reserved.\r
 For licensing, see LICENSE.html or http://ckeditor.com/license\r
 */\r
 \r
@@ -36,6 +36,7 @@ CKEDITOR.plugins.add( 'pagebreak',
                                'border-top: #999999 1px dotted;' +\r
                                'border-bottom: #999999 1px dotted;' +\r
                                'height: 5px;' +\r
+                               'page-break-after: always;' +\r
 \r
                        '}' );\r
        },\r
@@ -55,7 +56,8 @@ CKEDITOR.plugins.add( 'pagebreak',
                                        {\r
                                                div : function( element )\r
                                                {\r
-                                                       var style = element.attributes.style,\r
+                                                       var attributes = element.attributes,\r
+                                                               style = attributes && attributes.style,\r
                                                                child = style && element.children.length == 1 && element.children[ 0 ],\r
                                                                childStyle = child && ( child.name == 'span' ) && child.attributes.style;\r
 \r