You can customize the dialogs as shown in the api_dialog.html sample. This code will remove the upload tab in image and link dialogs:
CKEDITOR.on( 'dialogDefinition', function( ev )
{
// Take the dialog name and its definition from the event
// data.
var dialogName = ev.data.name;
var dialogDefinition = ev.data.definition;
// Check if the definition is from the dialog we're
// interested on (the Link and Image dialog).
if ( dialogName == 'link' || dialogName == 'image' )
{
// remove Upload tab
dialogDefinition.removeContents( 'Upload' );
}
});
I'm using CKEditor bundled with an older version of Opencart and I want to remove the 'Upload' tab from both the Image and Link dialogs.
I've used the code provided by alfonsomi, and it works perfectly for the Image dialog, but not for the Link dialog. Has anyone else come across this? It's very frustrating.
i managed to get it working using: CKEDITOR.on( 'dialogDefinition', function( ev ) { // Take the dialog name and its definition from the event data var dialogName = ev.data.name; var dialogDefinition = ev.data.definition; if ( dialogName == 'image' || dialogName == 'link' ) { // Remove upload tab dialogDefinition.removeContents('Upload'); dialogDefinition.removeContents('upload'); } });
looks like the image uses Upload and link uses upload - CASE SENSITIVE
I'm using CKEditor for Drupal and trying to remove the Upload tab but keep 'Browse Server' functionality (...want users to use file upload functionality in CKFinder).
I've tried setting the follow in my config.js and it's not working (ignored at runtime):
CKEDITOR.on( 'dialogDefinition', function( ev ) {
// Take the dialog name and its definition from the event data
var dialogName = ev.data.name;
var dialogDefinition = ev.data.definition;
if ( dialogName == 'image' || dialogName == 'link' ) {
// Remove upload tab
dialogDefinition.removeContents('Upload');
dialogDefinition.removeContents('upload');
}
});
Re: disable the upload tab
Is
filebrowserImageUploadUrl : 'ckfinder/core/connector/asp/connector.asp?command=QuickUpload&type=Images',
filebrowserFlashUploadUrl : 'ckfinder/core/connector/asp/connector.asp?command=QuickUpload&type=Flash',
Thanks.
Re: disable the upload tab
This code will remove the upload tab in image and link dialogs:
CKEDITOR.on( 'dialogDefinition', function( ev ) { // Take the dialog name and its definition from the event // data. var dialogName = ev.data.name; var dialogDefinition = ev.data.definition; // Check if the definition is from the dialog we're // interested on (the Link and Image dialog). if ( dialogName == 'link' || dialogName == 'image' ) { // remove Upload tab dialogDefinition.removeContents( 'Upload' ); } });Re: disable the upload tab
I've used the code provided by alfonsomi, and it works perfectly for the Image dialog, but not for the Link dialog. Has anyone else come across this? It's very frustrating.
Any help would be much appreciated.
Re: disable the upload tab
CKEDITOR.on( 'dialogDefinition', function( ev ) {
// Take the dialog name and its definition from the event data
var dialogName = ev.data.name;
var dialogDefinition = ev.data.definition;
if ( dialogName == 'image' || dialogName == 'link' ) {
// Remove upload tab
dialogDefinition.removeContents('Upload');
dialogDefinition.removeContents('upload');
}
});
looks like the image uses Upload and link uses upload - CASE SENSITIVE
Re: disable the upload tab
disable the upload tab
I'm using CKEditor for Drupal and trying to remove the Upload tab but keep 'Browse Server' functionality (...want users to use file upload functionality in CKFinder).
I've tried setting the follow in my config.js and it's not working (ignored at runtime):
Is the code below placed in the config.js file?
CKEDITOR.on( 'dialogDefinition', function( ev ) {
// Take the dialog name and its definition from the event data
var dialogName = ev.data.name;
var dialogDefinition = ev.data.definition;
if ( dialogName == 'image' || dialogName == 'link' ) {
// Remove upload tab
dialogDefinition.removeContents('Upload');
dialogDefinition.removeContents('upload');
}
});
config.removeDialogTabs =
Try adding that to your config.js in ckeditor instead of ckfinder. That worked well for me, though counterintuitive.