niuware / mui-rte

Material-UI Rich Text Editor and Viewer

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How to create a key command for the link control

islalobo opened this issue · comments

Checklist

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?