2012-12-06 22 views
5

मैं CKEditor के उपकरण पट्टी में एक बटन जोड़ने के लिए चाहते हैं, लेकिन बटन appearing.This नहीं है _source/plugins/footnote/CKEditor: बटन दिखाई दे रहा है

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 
      }); 
    } 
}); 

में सहेजा प्लगइन के निर्माण के लिए कोड है और यह config.js का कोड है

CKEDITOR.editorConfig = function(config) 

{ 

    config.toolbar = 'MyToolbar'; 

    config.extraPlugins = 'footnote'; 

    config.toolbar_MyToolbar = 
     [ 

    ['Bold','Footnote','Italic'] 

    ]; 

}; 

बस बोल्ड और इटैलिक टूलबार में दिखाई दे रहे हैं। लेकिन फुटनोट बटन दिखाई नहीं दे रहा है। आपकी मदद के लिए धन्यवाद।

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 
      }); 
    } 
}); 

/plugins/footnote/icons/myfootnote.png पर एक आइकन बनाने के लिए सुनिश्चित करें:

उत्तर

4

आप एक आइकन प्रदान नहीं कर रहे।

केवल पीएनजी स्वीकार किए जाते हैं।

2

बटन में एक ही नाम होना चाहिए (केस संवेदनशील)।

इस प्रकार editor.ui.addButton('Footnote',editor.ui.addButton('footnote',

द्वारा की जगह