Basically I removed the anchor button so there should not be a link to anchor option in my link window.
Any way to remove that dropdown option
 ?
?
Figured it out
if ( dialogName == 'link' )
    {
      var infoTab = dialogDefinition.getContents( 'info' );
      var linktypeField = infoTab.get( 'linkType' );
      /* Remove it from the array of items */
      linktypeField['items'].splice(1, 1);
    }
dialogDefinition allows you to completely redesign dialog boxes.
I did it this way, based on the example at http://nightly.ckeditor.com/7156/_samples/api_dialog.html
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" dialog).
    if ( dialogName == 'link' )
    {
        // Get a reference to the "Link Info" tab.
        var infoTab = dialogDefinition.getContents( 'info' );
        infoTab.remove( 'linkType' );
    }
});
$("#mydiv").ckeditor(function(){}, {
    removeDialogTabs: 'link:advanced;link:target'
    // any other customizations go here.
});
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With