JasonWoof Got questions, comments, patches, etc.? Contact Jason Woofenden
vanilla ckeditor-3.1
[ckeditor.git] / _source / plugins / format / plugin.js
index 1e4dab3..b28e4c8 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
@@ -33,7 +33,7 @@ CKEDITOR.plugins.add( 'format',
 \r
                                panel :\r
                                {\r
-                                       css : [ CKEDITOR.getUrl( editor.skinPath + 'editor.css' ) ].concat( config.contentsCss ),\r
+                                       css : editor.skin.editor.css.concat( config.contentsCss ),\r
                                        voiceLabel : lang.panelVoiceLabel\r
                                },\r
 \r
@@ -57,7 +57,11 @@ CKEDITOR.plugins.add( 'format',
 \r
                                        styles[ value ].apply( editor.document );\r
 \r
-                                       editor.fire( 'saveSnapshot' );\r
+                                       // Save the undo snapshot after all changes are affected. (#4899)\r
+                                       setTimeout( function()\r
+                                       {\r
+                                               editor.fire( 'saveSnapshot' );\r
+                                       }, 0 );\r
                                },\r
 \r
                                onRender : function()\r