X-Git-Url: https://jasonwoof.com/gitweb/?a=blobdiff_plain;f=_source%2Fplugins%2Fformat%2Fplugin.js;h=bb0d997f75d63b7b476f6a7ae4b5ea8c78487335;hb=refs%2Ftags%2Fv3.4.2;hp=1e4dab3193ac7698c328cd335cab31f37237b95f;hpb=8761695d9b70afe75905deaac88f78c1f8aeb32d;p=ckeditor.git diff --git a/_source/plugins/format/plugin.js b/_source/plugins/format/plugin.js index 1e4dab3..bb0d997 100644 --- a/_source/plugins/format/plugin.js +++ b/_source/plugins/format/plugin.js @@ -1,5 +1,5 @@ /* -Copyright (c) 2003-2009, CKSource - Frederico Knabben. All rights reserved. +Copyright (c) 2003-2010, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.html or http://ckeditor.com/license */ @@ -21,20 +21,19 @@ CKEDITOR.plugins.add( 'format', { var tag = tags[ i ]; styles[ tag ] = new CKEDITOR.style( config[ 'format_' + tag ] ); + styles[ tag ]._.enterMode = editor.config.enterMode; } editor.ui.addRichCombo( 'Format', { label : lang.label, title : lang.panelTitle, - voiceLabel : lang.voiceLabel, className : 'cke_format', - multiSelect : false, - panel : { - css : [ CKEDITOR.getUrl( editor.skinPath + 'editor.css' ) ].concat( config.contentsCss ), - voiceLabel : lang.panelVoiceLabel + css : editor.skin.editor.css.concat( config.contentsCss ), + multiSelect : false, + attributes : { 'aria-label' : lang.panelTitle } }, init : function() @@ -57,7 +56,11 @@ CKEDITOR.plugins.add( 'format', styles[ value ].apply( editor.document ); - editor.fire( 'saveSnapshot' ); + // Save the undo snapshot after all changes are affected. (#4899) + setTimeout( function() + { + editor.fire( 'saveSnapshot' ); + }, 0 ); }, onRender : function()