-2

Does anyone know how to hide these 2 buttons for the latest ckfinder?

enter image description here

Frederik Heyninck
  • 3,493
  • 4
  • 20
  • 19

1 Answers1

0

You have to remove the FilesMoveCopy and Settings Modules using removeModules configuration.

// Disable Move, Copy and Settings functionality:
config.removeModules = 'FilesMoveCopy,Settings';

However, if you wish to only remove buttons from toolbar you'd have to listen for toolbar events.

finder.on( 'toolbar:reset:Main:file', function( evt ) {
    var toRemove = evt.data.toolbar.filter( function( button ) {
        return button.get( 'name' ) === 'Settings';
    } );

    evt.data.toolbar.remove( toRemove );
}, null, null, 1000 );

Please note that there are 4 toolbar events:

  • toolbar:reset:Main:file
  • toolbar:reset:Main:files
  • toolbar:reset:Main:folder
  • toolbar:reset:Main:resources
jodator
  • 2,445
  • 16
  • 29