function kCustomMainInsertButton2(imageId,imageFile,speedTip,tagOpen,tagClose,sampleText){
var wikiOptions = {'section': 'main', 'group': 'insert', 'tools': {}};
wikiOptions['tools'][imageId] = {};
wikiOptions['tools'][imageId][label] = speedTip;
... // set keys explicitly like above
$j('#wpTextbox1').wikiEditor('addToToolbar',wikiOptions);
}
## example of a call:
kCustomMainInsertButton(
'MyID', //imageId
'http://upload.x/.jpg', //imageFile
'My name', //speedTip
'code1', //tagOpen
'code2', //tagClose
'code3' //sampleText
);
Creates for example:
'tools' : {
imageId : {
label = 'My name',
}
}
whereas it should create:
'tools' : {
'MyID' : {
label = 'My name',
}
}