adding some plugins.
select a value by default
the combo fit the content
In IE6when I click to see the available values, nothing happens
viewtopic.php?f=6&t=566&p=1307&hilit=toolbar+combo&sid=e0db4834931f28889de25bcf76915681#p1307
http://sourceforge.net/tracker/index.ph ... tid=737639
var FCKMyCombo_command = function(name)
{
this.Name = name ;
}
//This get's executed when an item from the combo list
FCKMyCombo_command.prototype.Execute = function (itemText, itemLabel)
{
var oEditor = FCKeditorAPI.GetInstance('FCKeditor1');
/*if (itemText != "")
oEditor.InsertHtml(itemText);*/
}
FCKMyCombo_command.prototype.GetState = function()
{
return;
}
FCKCommands.RegisterCommand( 'mycombocommand' , new FCKMyCombo_command('mycombocommand') ) ;
/*
2nd, create the Combo object
*/
var FCKToolbarMyCombo = function(tooltip,style)
{
this.Command = FCKCommands.GetCommand('mycombocommand');//the command to execute when an item is selected
this.CommandName = 'mycombocommand';
this.Label = this.GetLabel();
this.Tooltip = tooltip? tooltip : this.Label; //Doesn't seem to work
this.Style = style; //FCK_TOOLBARITEM_ICONTEXT OR FCK_TOOLBARITEM_ONLYTEXT
};
FCKToolbarMyCombo.prototype=new FCKToolbarSpecialCombo;
//NO Label to appear in the FCK toolbar
FCKToolbarMyCombo.prototype.GetLabel=function()
{
return "";
};
//Add the items to the combo list
FCKToolbarMyCombo.prototype.CreateItems = function (A)
{
//this._Combo.AddItem(itemText, itemLabel); //see FCKMyCombo_command.prototype.Execute = function(itemText, itemLabel) above
//this._Combo.AddItem('catalán to insert', '<span style="color:#000000;font-weight: normal; font-size: 10pt;">catalán</span>');
this._Combo.AddItem('català', 'català');
this._Combo.AddItem('español', 'español');
this._Combo.AddItem('english', 'english');
}
//Register the combo with the FCKEditor
FCKToolbarItems.RegisterItem( 'mycombo' , new FCKToolbarMyCombo( 'mycombo', FCK_TOOLBARITEM_ICONTEXT ) ) ; //or FCK_TOOLBARITEM_ONLYTEXT
function FCKeditor_OnComplete ( editorInstance )
{
// inic. toolbar
editorInstance.Commands.GetCommand( 'mycombocommand' ).Execute('cat','català');
