Open cgt-training2 opened 3 years ago
For fix that, you should update all item on toolbar. Currently on Jexcel CE/Pro toolbar is not update by cell selected.
Try this :
onselection = function(el, x1, y1, x2, y2) {
var obj = el.jexcel;
// update toolbar items available in obj.toolbar
// For example
var selectFontSize = obj.toolbar.querySelector("[data-k=font-size]");
selectFontSize.value = obj.records[y1][x1].style.FontSize;
}
},
Now you shloud make for all items of toolbar where you want update when selection
I will add that to the wish list for future releases.
@paulhodel maybe add a fonction on item toolbar for update like « onupdate(DOMElement ItemToolbar, el) ? And when onselection on spreadsheet, call onupdate of each Item toolbar ?
@Guillaume-Bo , Hello hope you're doing well.I applied suggested solution and it's working. thank you very much.
Check the example given on this link of JEXCEL official site: https://bossanova.uk/jexcel/v4/examples/spreadsheet-toolbars in the example change font size of cell A1 to 14px then click on cell A2(having font size of 9 px) the drop down shows 14px. Second issue is that it doesn't allow cell A2 to select 14px on the go but if i select 15px or any other value then if i select 14px cell A2 changed to 14px.
Please help and provide solution for this issue.