buttons.buttons.text
Since: Buttons 1.0.0
The text to show in the button.
Please note - this property requires the Buttons extension for DataTables.
Examples
Set the text :
new DataTable('#myTable', {
layout: {
topStart: 'buttons'
},
buttons: [{ extend: 'copy', text: 'Copy to clipboard' }]
});
Highlight an action key using HTML:
new DataTable('#myTable', {
layout: {
topStart: 'buttons'
},
buttons: [
{
extend: 'print',
text: '<em>P</em>rint',
key: {
key: 'p',
altkey: true
}
}
]
});
Internationalisation using the i18n()
method::
new DataTable('#myTable', {
layout: {
topStart: 'buttons'
},
buttons: [
{
extend: 'print',
text: function (dt, button, config) {
return dt.i18n('buttons.print', 'Print');
}
}
]
});