Skip to main content

useCommands

A core hook which provides the commands for usage in your editor.

import { useCommands } from '@remirror/react';
const EditorButton = () => {  const commands = useCommands();
  return (    <>      <button onClick={() => commands.toggleBold()}>Click me!</button>    </>  );};