var grid = new tui.Grid({
el: $('#grid'),
scrollX: false,
scrollY: false,
columns: [
{
title: 'whiteSpace: \'nowrap\'',
name: 'nowrap',
editOptions: {
type: 'text',
useViewMode: true
}
},
{
title: 'whiteSpace: \'normal\'',
name: 'normal',
whiteSpace: 'normal',
editOptions: {
type: 'text',
useViewMode: true
}
},
{
title: 'whiteSpace: \'pre\'',
name: 'pre',
whiteSpace: 'pre',
editOptions: {
type: 'text',
useViewMode: true
}
},
{
title: 'whiteSpace: \'pre-wrap\'',
name: 'preWrap',
whiteSpace: 'pre-wrap',
editOptions: {
type: 'text',
useViewMode: true
}
},
{
title: 'whiteSpace: \'pre-line\'',
name: 'preLine',
whiteSpace: 'pre-line',
editOptions: {
type: 'text',
useViewMode: true
}
}
]
});
var gridData = [];
(function() {
_.times(10, function(number) {
var text = 'grid example\ngrid newline and clipboard example\n\ngrid example';
gridData.push({
nowrap: text,
normal: text,
pre: text,
preWrap: text,
preLine: text
});
})
})();
grid.setData(gridData);