I defined a custom button at toolbar named MoreButton,
It is runing OK in the first textarea in a page,but the second textarea in same page dont show this button.why??
the code like following:
I guessed ,only the first instance loading,the pluginsLoaded event was called...
please give me a help...
thanks very much...
It is runing OK in the first textarea in a page,but the second textarea in same page dont show this button.why??
the code like following:
var config = {"toolbar":"simple","language":'<?php echo $language; ?>'};
var editor = CKEDITOR.replace( editid, config);
//add a new button for Full toolbar
editor.on('pluginsLoaded', function( ev ){
//add command
editor.addCommand( 'MoreButtonCmd', {
exec : function (e){
//if the editor exists,first destory it.
if ( editor )
editor.destroy();
//replace the textarea with new toolbar
editor = CKEDITOR.replace(editid,
{
toolbar :'Full',
language:'<?php echo $language; ?>'
});
},
canUndo : false
});
//add new button at UI
editor.ui.addButton( 'MoreButton', {
label : 'MoreButton' ,
title : 'MoreButton',
command : 'MoreButtonCmd'
});
});
I guessed ,only the first instance loading,the pluginsLoaded event was called...
please give me a help...
thanks very much...

Re: Why my custom button only show in first instance
the api said:
pluginsLoaded : <object>.on( 'pluginsLoaded', function( e ){ ... } ) Since: 3.0 Fired when all plugins are loaded and initialized into the editor [b]instance[/b].I have three editor instance in one webpage,and their name is not same; why the pluginsLoaded event only fired only once?????
and how to deal with these issue? thank you very much........
Re: Why my custom button only show in first instance
Re: Why my custom button only show in first instance
but I cant open the URL......
please copy the content to me ...
thank you very much.
amberleaf
Re: Why my custom button only show in first instance
I get it use the proxy from google's snapshot.hahaha.
the method is the following code:
var config = { toolbar:"simple", on: { 'pluginsLoaded': function(ev) { var thisEditor=ev.editor; var thisEditorName=ev.editor.name; thisEditor . addCommand( 'MoreButtonCmd', { exec : function (e){ if ( thisEditor ) thisEditor.destroy(); thisEditor = CKEDITOR.replace(thisEditorName, { toolbar :'Full' }); } }); thisEditor.ui.addButton( 'MoreButton', { label : 'morebutton' , title : 'morebutton', command : 'MoreButtonCmd' }); } }}; var editor = CKEDITOR.replace( editid, config);Re: Why my custom button only show in first instance
B.document is null U=X+U;}else U=V.docType+'<html dir="'+...rtElement',function(K){var L=K.datawhy????