How to create a key command for the link control
islalobo opened this issue · comments
Alanna MacNevin commented
Checklist
- This is not covered in the repository examples.
- I am using the package latest version.
- This is a bug report or an enhancement proposal.
Description
We were able to create custom key commands for each of the controls we are using with either togglBlockType
or toggleInlineStyle
. However, trying to toggle the link control with a key command has not been working
{
key: 55, // 7
name: 'toggle-unordered-list',
callback: (editorState) => {
const newState = RichUtils.toggleBlockType(editorState, 'unordered-list-item');
return newState;
},
},
- What is the correct way to implement a key command for a link control?
- Is there documentation on what the default key commands are?
- Is there a way to implement a tooltip or title to be added to the icon buttons to display the assoc. key command?