Bold,Italic Font and Underline via keyboard

Tags: #<Tag:0x00007f8b28dc93c0>

How do I Bold,Italic Font and Underline fonts in handsontable via the keyboard?

Hi @kunal

Here’s an example on how to change a font (attached to className) http://jsfiddle.net/handsoncode/d74mLb80/

And when it comes to key shortcuts here’s a demo that should help http://jsfiddle.net/handsoncode/k39rmbgt/ (key part)

  //saving data using CTRL + B
  var lastKey;
  hot.updateSettings({
    afterDocumentKeyDown: function(e) {
      if (lastKey === 'Control' && e.key === 'b') {
        console.log('saving');
        exportPlugin.downloadFile('csv', {
          columnHeaders: true, // default false, exports the column headers
          rowHeaders: true, // default false, exports the row headers
        });
      }
      lastKey = e.key;
    }
  });

It’s an example with export to .csv but you can put any code inside (like the updateSettings({})).