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

How to disable sideMenu at top block (index 0) #709

Open
Gr4vity4 opened this issue Apr 20, 2024 · 1 comment
Open

How to disable sideMenu at top block (index 0) #709

Gr4vity4 opened this issue Apr 20, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@Gr4vity4
Copy link

inspiration from notion title, at the top can't delete or change props, I tried to use getTextCursorPosition() method with simple watching instance with setInterval() then setState but still doesn't work

<BlockNoteView
  editor={editor}
  theme={"light"}
  onChange={() => {
    syncToCloud(editor.document);
  }}
  slashMenu={false}
  sideMenu={false}
>
  {/* {controlSideMenu && (
    <SideMenuController
      sideMenu={(props) => (
        <SideMenu {...props}>
          <DragHandleButton {...props} />
        </SideMenu>
      )}
    />
  )} */}

  {/* Replaces the default Slash Menu. */}
  <SuggestionMenuController
    triggerCharacter={"/"}
    getItems={async (query) =>
      // Gets all default slash menu items and `insertMarkdown` item.
      filterSuggestionItems(
        [
          ...getDefaultReactSlashMenuItems(editor),
          insertMarkdown(editor),
          insertMarkdownCompact(editor),
          insertAsk(editor),
        ],
        query
      )
    }
  />
</BlockNoteView>
@Gr4vity4 Gr4vity4 added the enhancement New feature or request label Apr 20, 2024
@virus2016
Copy link

Would love a solution for this

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

No branches or pull requests

2 participants