Add accesskey to an editor form button

Add accesskey to an editor form button

timbcusicktimbcusick Posts: 21Questions: 6Answers: 0

We have implemented the next/previous functionality on our editor forms which works great. Users are now asking for accesskeys to be added to the previous/next buttons so they can quickly move through items without having to switch to the mouse. It looks like access keys can be added to the table buttons by doing this
key: { key: 'p', altKey: true },
However, I don't see that exposed on the form buttons. which only seem to accept a label a fn and className. Anyone know of a way to add accesskey to a form button? Thanks!

Answers

  • tangerinetangerine Posts: 3,350Questions: 37Answers: 394

    Someone supplied a line of jQuery here: https://datatables.net//forums/discussion/9953

    Presumably it could be adapted for your purpose.

  • timbcusicktimbcusick Posts: 21Questions: 6Answers: 0

    tangerine thanks. I guess I could add classnames to buttons and then add accesskeys through JQuery using class as the selector. Still would appreciate a cleaner approach if it exists but seems like a workable solution for now.

This discussion has been closed.