File tree Expand file tree Collapse file tree 1 file changed +6
-7
lines changed Expand file tree Collapse file tree 1 file changed +6
-7
lines changed Original file line number Diff line number Diff line change 2626 updateToolbar = function ( ) {
2727 if ( options . activeToolbarClass ) {
2828 $ ( options . toolbarSelector ) . find ( toolbarBtnSelector ) . each ( function ( ) {
29- var command = $ ( this ) . data ( options . commandRole ) . split ( ' ' ) [ 0 ] ;
30- if ( document . queryCommandSupported ( command ) ) {
31- if ( document . queryCommandState ( command ) ) {
32- $ ( this ) . addClass ( options . activeToolbarClass ) ;
33- } else {
34- $ ( this ) . removeClass ( options . activeToolbarClass ) ;
35- }
29+ var command = $ ( this ) . data ( options . commandRole ) ,
30+ format = command . match ( / f o r m a t B l o c k ( .+ ) / ) ;
31+ if ( document . queryCommandState ( command ) || ( format && ( format [ 1 ] == document . queryCommandValue ( "formatBlock" ) ) ) ) {
32+ $ ( this ) . addClass ( options . activeToolbarClass ) ;
33+ } else {
34+ $ ( this ) . removeClass ( options . activeToolbarClass ) ;
3635 }
3736 } ) ;
3837 }
You can’t perform that action at this time.
0 commit comments