Skip to content

Commit 6e7d43a

Browse files
committed
widen slashmenu typings
1 parent 5a48db4 commit 6e7d43a

File tree

3 files changed

+3
-10
lines changed

3 files changed

+3
-10
lines changed

packages/core/src/BlockNoteEditor.ts

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -84,11 +84,7 @@ export type BlockNoteEditorOptions<
8484
*
8585
* @default defaultSlashMenuItems from `./extensions/SlashMenu`
8686
*/
87-
slashMenuItems: BaseSlashMenuItem<
88-
BlockSchemaFromSpecs<BSpecs>,
89-
InlineContentSchemaFromSpecs<ISpecs>,
90-
StyleSchemaFromSpecs<SSpecs>
91-
>[];
87+
slashMenuItems: BaseSlashMenuItem<any, any, any>[];
9288

9389
/**
9490
* The HTML element that should be used as the parent element for the editor.

packages/react/src/hooks/useBlockNote.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ const initEditor = <
2525
BlockNoteEditor.create({
2626
slashMenuItems: getDefaultReactSlashMenuItems(
2727
getBlockSchemaFromSpecs(options.blockSpecs || defaultBlockSpecs)
28-
) as any,
28+
),
2929
...options,
3030
});
3131

tests/src/utils/components/Editor.tsx

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,7 @@ export default function Editor() {
3939
editor: { class: styles.editor, "data-test": "editor" },
4040
},
4141
blockSpecs,
42-
slashMenuItems: [
43-
...getDefaultReactSlashMenuItems(),
44-
...slashMenuItems,
45-
] as any, // TODO
42+
slashMenuItems: [...getDefaultReactSlashMenuItems(), ...slashMenuItems],
4643
});
4744

4845
console.log(editor);

0 commit comments

Comments
 (0)