Orca Note Plugin API Documentation
    Preparing search index...

    Type Alias BlockMenuCommand

    BlockMenuCommand:
        | {
            render: (
                blockId: DbId,
                rootBlockId: DbId,
                close: () => void,
            ) => React.ReactElement;
            worksOnMultipleBlocks: false;
        }
        | {
            render: (
                blockIds: DbId[],
                rootBlockId: DbId,
                close: () => void,
            ) => React.ReactElement;
            worksOnMultipleBlocks: true;
        }

    Command configuration for the block context menu. Can be configured to work with single blocks or multiple selected blocks.

    Type declaration

    • {
          render: (
              blockId: DbId,
              rootBlockId: DbId,
              close: () => void,
          ) => React.ReactElement;
          worksOnMultipleBlocks: false;
      }
      • render: (blockId: DbId, rootBlockId: DbId, close: () => void) => React.ReactElement

        Function to render the menu item, receiving the block ID and context

      • worksOnMultipleBlocks: false

        Indicates this command works only on a single block

    • {
          render: (
              blockIds: DbId[],
              rootBlockId: DbId,
              close: () => void,
          ) => React.ReactElement;
          worksOnMultipleBlocks: true;
      }
      • render: (blockIds: DbId[], rootBlockId: DbId, close: () => void) => React.ReactElement

        Function to render the menu item, receiving an array of block IDs and context

      • worksOnMultipleBlocks: true

        Indicates this command works on multiple selected blocks