JasonWoof Got questions, comments, patches, etc.? Contact Jason Woofenden
vanilla ckeditor-3.5.4
[ckeditor.git] / _source / plugins / justify / plugin.js
index 2de9b0b..0a5f07d 100644 (file)
@@ -1,5 +1,5 @@
 /*\r
-Copyright (c) 2003-2010, CKSource - Frederico Knabben. All rights reserved.\r
+Copyright (c) 2003-2011, CKSource - Frederico Knabben. All rights reserved.\r
 For licensing, see LICENSE.html or http://ckeditor.com/license\r
 */\r
 \r
@@ -159,7 +159,7 @@ For licensing, see LICENSE.html or http://ckeditor.com/license
                                iterator = ranges[ i ].createIterator();\r
                                iterator.enlargeBr = enterMode != CKEDITOR.ENTER_BR;\r
 \r
-                               while ( ( block = iterator.getNextParagraph() ) )\r
+                               while ( ( block = iterator.getNextParagraph( enterMode == CKEDITOR.ENTER_P ? 'p' : 'div' ) ) )\r
                                {\r
                                        block.removeAttribute( 'align' );\r
                                        block.removeStyle( 'text-align' );\r
@@ -237,3 +237,14 @@ For licensing, see LICENSE.html or http://ckeditor.com/license
                requires : [ 'domiterator' ]\r
        });\r
 })();\r
+\r
+ /**\r
+ * List of classes to use for aligning the contents. If it's null, no classes will be used\r
+ * and instead the corresponding CSS values will be used. The array should contain 4 members, in the following order: left, center, right, justify.\r
+ * @name CKEDITOR.config.justifyClasses\r
+ * @type Array\r
+ * @default null\r
+ * @example\r
+ * // Use the classes 'AlignLeft', 'AlignCenter', 'AlignRight', 'AlignJustify'\r
+ * config.justifyClasses = [ 'AlignLeft', 'AlignCenter', 'AlignRight', 'AlignJustify' ];\r
+ */\r