Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for Shortcut & Tooltip #225

Open
Udhayarajan opened this issue Jul 19, 2024 · 1 comment
Open

Support for Shortcut & Tooltip #225

Udhayarajan opened this issue Jul 19, 2024 · 1 comment

Comments

@Udhayarajan
Copy link

Ability to use shortcuts for actions like quoting with ctrl+q and bolding with ctrl+B. Also, adding tooltips for the editor toolbar icons on hover would greatly improve user experience.

@jaywcjlove
Copy link
Member

const CustomKeymap = keymap.of([
  {
    key: "Ctrl-S",
    run: () => {
      console.log("Ctrl-S pressed");
      return true;
    }
  },
  {
    key: "Ctrl-B",
    run: () => {
      console.log("Ctrl-B pressed");
      return true;
    }
  },
]);


const Dome = () => {
  return (
    <MarkdownEditor
      value={mdStr}
      extensions=[CustomKeymap]
    />
  )
};

@Udhayarajan It seems this feature is not easy to implement.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants