2012-12-06 24 views
5

ich eine Schaltfläche in Symbolleiste von CKEditor hinzufügen möchten aber Taste ist nicht appearing.This ist Code für die Erstellung von Plug-in gespeichert _source/plugins/footnote/CKEditor: Button wird nicht angezeigt

CKEDITOR.plugins.add('footnote', 
{ 
    init: function(editor) 
    { 
     var pluginName = 'footnote'; 
     CKEDITOR.dialog.add(pluginName, this.path + 'dialogs/footnote.js'); 
     editor.addCommand(pluginName, new CKEDITOR.dialogCommand(pluginName)); 
     editor.ui.addButton('Footnote', 
      { 
       label: 'Footnote or Citation', 
       command: pluginName 
      }); 
    } 
}); 

Und das ist Code von config.js

Nur fett und kursiv erscheinen in der Symbolleiste.Aber Fußnote Schaltfläche wird nicht angezeigt. Danke für Ihre Hilfe.

Antwort

4

Sie bieten kein Symbol:

CKEDITOR.plugins.add('footnote', 
{ 
    icons: 'myfootnote', 
    init: function (editor) { 
     var pluginName = 'footnote'; 
     CKEDITOR.dialog.add(pluginName, this.path + 'dialogs/footnote.js'); 
     editor.addCommand(pluginName, new CKEDITOR.dialogCommand(pluginName)); 
     editor.ui.addButton('Footnote', 
      { 
       label: 'Footnote or Citation', 
       icon: 'myfootnote', 
       command: pluginName 
      }); 
    } 
}); 

Seien Sie sicher, ein Symbol auf /plugins/footnote/icons/myfootnote.png zu erstellen.

Nur PNGs werden akzeptiert.

2

Die Schaltfläche muss denselben Namen haben (Groß-/Kleinschreibung beachten).

So ersetzen editor.ui.addButton('Footnote', durch editor.ui.addButton('footnote',