handsontable/jquery-handsontable — pull request #1834 by paulo-raca (2014-10-15 20:37:18+00:00)
Title: Handsontable.Dom.fastInnerHTML can accept DOM elements

When rendering HTML cells, I sometimes want to send the actual DOM element instead of "raw HTML".
This is particularly important to implement rich-html colHeaders. Simple example:

var columnNames = ['foo', 'bar'];
$("#table").handsontable({
colHeaders: function(col) {
var $span = $('');
$span.text(columnNames[col]);
return $span[0];
},
...
});

For this example, the current implementation displays the string "[object HTMLSpanElement]" on the column title. After the changes, the title is show in red as expected.

Yes, I know that this example is simple enough that the current implementation is enough, but I'm working on more complex stuff where it will be needed (I'll need TeX formulas in column headers)