Ticket #5870: link.patch

File link.patch, 1.1 KB (added by Scott Bronson, 13 years ago)

Patch to make displaying anchors optional, controlled by a config item.

  • public/app/ckeditor/_source/plugins/link/plugin.js

    diff --git a/public/app/ckeditor/_source/plugins/link/plugin.js b/public/app/ckeditor/_source/plugins/link/plugin.js
    index f373eaf..69672a8 100644
    a b CKEDITOR.plugins.add( 'link', 
    3030                CKEDITOR.dialog.add( 'anchor', this.path + 'dialogs/anchor.js' );
    3131
    3232                // Add the CSS styles for anchor placeholders.
    33                 editor.addCss(
     33                if( editor.config.linkShowAnchors ) editor.addCss(
    3434                        'img.cke_anchor' +
    3535                        '{' +
    3636                                'background-image: url(' + CKEDITOR.getUrl( this.path + 'images/anchor.gif' ) + ');' +
    CKEDITOR.plugins.add( 'link', 
    132132
    133133        afterInit : function( editor )
    134134        {
     135                if ( !editor.config.linkShowAnchors )
     136                                return;
     137
    135138                // Register a filter to displaying placeholders after mode change.
    136139
    137140                var dataProcessor = editor.dataProcessor,
    CKEDITOR.unlinkCommand.prototype = 
    225228CKEDITOR.tools.extend( CKEDITOR.config,
    226229{
    227230        linkShowAdvancedTab : true,
    228         linkShowTargetTab : true
     231        linkShowTargetTab : true,
     232        linkShowAnchors : true
    229233} );
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy