Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
An example how one might add custom file browsing handler for CKEditor.
CKEDITOR.replace( 'editor', {
on: {
// You need to listen to dialogShow event.
dialogShow: function( evt ) {
// Getting browse button object.
var browseButton = 'info', 'browse' );
if ( browseButton ) {
browseButton.on( 'click', function( evt ) {
// Do your custom logic here, e.g. display a floating div with UI.
evt.stop(); // Stop the event if you want nothing more to happen.
}, null, null, 9 );
} );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.