I'm using Handsontable library for edit spreadsheet with financial data. I'm set custom numeral format, for using ' ' (space) as thousand separator.
numeral.language('ru', {
delimiters: {
thousands: ' ',
decimal: ','
},
abbreviations: {
thousand: 'k',
million: 'm',
billion: 'b',
trillion: 't'
},
ordinal: function (number) {
return number === 1 ? 'er' : 'ème';
},
currency: {
symbol: '€'
}
});
All works fine, but in some (with custom color and text-align) cells this settings not works. What is wrong?
Custom cell renderer for setting color and align:
function sumCellRenderer(instance, td, row, col, prop, value, cellProperties) {
Handsontable.renderers.TextRenderer.apply(this, arguments);
td.style.background = '#FFFF88';
td.style.textAlign = 'right';
}
Working example at http://jsfiddle.net/m2dxws5a/7/
Custom cell in bottom marked with yellow color.