Making cells bold/italic/underlined

Posted by: daniel on 28 May 2019, 2:25 pm EST

  • Posted 28 May 2019, 2:25 pm EST

    Hi,

    When using SpreadJS and having a spreadsheet up and running, is it possible to make cells bold/italic/underlined by just using ctrl+b/i/u respectively, just like you can do in Excel?

    I found how to change formatting from the API, but I want to allow the user to make cells bold/italic/underline using the spreadsheet.

    Is this possible?

  • Posted 29 May 2019, 2:26 am EST

    Hi,

    You need to handle the keydown event on the spread’s host element and perform the required update. To make it easier you could add a custom command to update the style and then just call the command in the keydown handler. Please refer to the attached sample which demonstrates the same and let us know if you face any issue.

    ~sharad

    spreadTextStyleShortcuts.zip

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels