Skip to content

feat: use fumadocs for website #1654

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
6 changes: 6 additions & 0 deletions examples/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
module.exports = {
extends: ["../.eslintrc.js"],
rules: {
"import/extensions": "off",
},
};
2 changes: 1 addition & 1 deletion examples/01-basic/01-minimal/main.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// AUTO-GENERATED FILE, DO NOT EDIT DIRECTLY
import React from "react";
import { createRoot } from "react-dom/client";
import App from "./App.jsx";
import App from "./src/App.jsx";

const root = createRoot(document.getElementById("root")!);
root.render(
Expand Down
2 changes: 1 addition & 1 deletion examples/01-basic/02-block-objects/main.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// AUTO-GENERATED FILE, DO NOT EDIT DIRECTLY
import React from "react";
import { createRoot } from "react-dom/client";
import App from "./App.jsx";
import App from "./src/App.jsx";

const root = createRoot(document.getElementById("root")!);
root.render(
Expand Down
2 changes: 1 addition & 1 deletion examples/01-basic/03-multi-column/main.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// AUTO-GENERATED FILE, DO NOT EDIT DIRECTLY
import React from "react";
import { createRoot } from "react-dom/client";
import App from "./App.jsx";
import App from "./src/App.jsx";

const root = createRoot(document.getElementById("root")!);
root.render(
Expand Down
2 changes: 1 addition & 1 deletion examples/01-basic/04-default-blocks/main.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// AUTO-GENERATED FILE, DO NOT EDIT DIRECTLY
import React from "react";
import { createRoot } from "react-dom/client";
import App from "./App.jsx";
import App from "./src/App.jsx";

const root = createRoot(document.getElementById("root")!);
root.render(
Expand Down
2 changes: 1 addition & 1 deletion examples/01-basic/05-removing-default-blocks/main.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// AUTO-GENERATED FILE, DO NOT EDIT DIRECTLY
import React from "react";
import { createRoot } from "react-dom/client";
import App from "./App.jsx";
import App from "./src/App.jsx";

const root = createRoot(document.getElementById("root")!);
root.render(
Expand Down
2 changes: 1 addition & 1 deletion examples/01-basic/06-block-manipulation/main.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// AUTO-GENERATED FILE, DO NOT EDIT DIRECTLY
import React from "react";
import { createRoot } from "react-dom/client";
import App from "./App.jsx";
import App from "./src/App.jsx";

const root = createRoot(document.getElementById("root")!);
root.render(
Expand Down
2 changes: 1 addition & 1 deletion examples/01-basic/07-selection-blocks/main.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// AUTO-GENERATED FILE, DO NOT EDIT DIRECTLY
import React from "react";
import { createRoot } from "react-dom/client";
import App from "./App.jsx";
import App from "./src/App.jsx";

const root = createRoot(document.getElementById("root")!);
root.render(
Expand Down
2 changes: 1 addition & 1 deletion examples/01-basic/08-ariakit/main.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// AUTO-GENERATED FILE, DO NOT EDIT DIRECTLY
import React from "react";
import { createRoot } from "react-dom/client";
import App from "./App.jsx";
import App from "./src/App.jsx";

const root = createRoot(document.getElementById("root")!);
root.render(
Expand Down
2 changes: 1 addition & 1 deletion examples/01-basic/09-shadcn/main.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// AUTO-GENERATED FILE, DO NOT EDIT DIRECTLY
import React from "react";
import { createRoot } from "react-dom/client";
import App from "./App.jsx";
import App from "./src/App.jsx";

const root = createRoot(document.getElementById("root")!);
root.render(
Expand Down
2 changes: 1 addition & 1 deletion examples/01-basic/10-localization/main.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// AUTO-GENERATED FILE, DO NOT EDIT DIRECTLY
import React from "react";
import { createRoot } from "react-dom/client";
import App from "./App.jsx";
import App from "./src/App.jsx";

const root = createRoot(document.getElementById("root")!);
root.render(
Expand Down
2 changes: 1 addition & 1 deletion examples/01-basic/11-custom-placeholder/main.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// AUTO-GENERATED FILE, DO NOT EDIT DIRECTLY
import React from "react";
import { createRoot } from "react-dom/client";
import App from "./App.jsx";
import App from "./src/App.jsx";

const root = createRoot(document.getElementById("root")!);
root.render(
Expand Down
2 changes: 1 addition & 1 deletion examples/01-basic/12-multi-editor/main.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// AUTO-GENERATED FILE, DO NOT EDIT DIRECTLY
import React from "react";
import { createRoot } from "react-dom/client";
import App from "./App.jsx";
import App from "./src/App.jsx";

const root = createRoot(document.getElementById("root")!);
root.render(
Expand Down
2 changes: 1 addition & 1 deletion examples/01-basic/13-custom-paste-handler/main.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// AUTO-GENERATED FILE, DO NOT EDIT DIRECTLY
import React from "react";
import { createRoot } from "react-dom/client";
import App from "./App.jsx";
import App from "./src/App.jsx";

const root = createRoot(document.getElementById("root")!);
root.render(
Expand Down
2 changes: 1 addition & 1 deletion examples/01-basic/testing/main.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// AUTO-GENERATED FILE, DO NOT EDIT DIRECTLY
import React from "react";
import { createRoot } from "react-dom/client";
import App from "./App.jsx";
import App from "./src/App.jsx";

const root = createRoot(document.getElementById("root")!);
root.render(
Expand Down
2 changes: 1 addition & 1 deletion examples/02-backend/01-file-uploading/main.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// AUTO-GENERATED FILE, DO NOT EDIT DIRECTLY
import React from "react";
import { createRoot } from "react-dom/client";
import App from "./App.jsx";
import App from "./src/App.jsx";

const root = createRoot(document.getElementById("root")!);
root.render(
Expand Down
2 changes: 1 addition & 1 deletion examples/02-backend/02-saving-loading/main.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// AUTO-GENERATED FILE, DO NOT EDIT DIRECTLY
import React from "react";
import { createRoot } from "react-dom/client";
import App from "./App.jsx";
import App from "./src/App.jsx";

const root = createRoot(document.getElementById("root")!);
root.render(
Expand Down
2 changes: 1 addition & 1 deletion examples/02-backend/03-s3/main.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// AUTO-GENERATED FILE, DO NOT EDIT DIRECTLY
import React from "react";
import { createRoot } from "react-dom/client";
import App from "./App.jsx";
import App from "./src/App.jsx";

const root = createRoot(document.getElementById("root")!);
root.render(
Expand Down
2 changes: 1 addition & 1 deletion examples/02-backend/04-rendering-static-documents/main.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// AUTO-GENERATED FILE, DO NOT EDIT DIRECTLY
import React from "react";
import { createRoot } from "react-dom/client";
import App from "./App.jsx";
import App from "./src/App.jsx";

const root = createRoot(document.getElementById("root")!);
root.render(
Expand Down
2 changes: 1 addition & 1 deletion examples/03-ui-components/01-ui-elements-remove/main.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// AUTO-GENERATED FILE, DO NOT EDIT DIRECTLY
import React from "react";
import { createRoot } from "react-dom/client";
import App from "./App.jsx";
import App from "./src/App.jsx";

const root = createRoot(document.getElementById("root")!);
root.render(
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// AUTO-GENERATED FILE, DO NOT EDIT DIRECTLY
import React from "react";
import { createRoot } from "react-dom/client";
import App from "./App.jsx";
import App from "./src/App.jsx";

const root = createRoot(document.getElementById("root")!);
root.render(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import {
useCreateBlockNote,
} from "@blocknote/react";

import { BlueButton } from "./BlueButton.js";
import { BlueButton } from "./BlueButton";

export default function App() {
// Creates a new editor instance.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// AUTO-GENERATED FILE, DO NOT EDIT DIRECTLY
import React from "react";
import { createRoot } from "react-dom/client";
import App from "./App.jsx";
import App from "./src/App.jsx";

const root = createRoot(document.getElementById("root")!);
root.render(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import {
} from "@blocknote/react";

import { RiAlertFill } from "react-icons/ri";
import { Alert } from "./Alert.js";
import { Alert } from "./Alert";

// Our schema with block specs, which contain the configs and implementations for
// blocks that we want our editor to use.
Expand Down
2 changes: 1 addition & 1 deletion examples/03-ui-components/04-side-menu-buttons/main.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// AUTO-GENERATED FILE, DO NOT EDIT DIRECTLY
import React from "react";
import { createRoot } from "react-dom/client";
import App from "./App.jsx";
import App from "./src/App.jsx";

const root = createRoot(document.getElementById("root")!);
root.render(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import {
useCreateBlockNote,
} from "@blocknote/react";

import { RemoveBlockButton } from "./RemoveBlockButton.js";
import { RemoveBlockButton } from "./RemoveBlockButton";

export default function App() {
// Creates a new editor instance.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// AUTO-GENERATED FILE, DO NOT EDIT DIRECTLY
import React from "react";
import { createRoot } from "react-dom/client";
import App from "./App.jsx";
import App from "./src/App.jsx";

const root = createRoot(document.getElementById("root")!);
root.render(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import {
useCreateBlockNote,
} from "@blocknote/react";

import { ResetBlockTypeItem } from "./ResetBlockTypeItem.js";
import { ResetBlockTypeItem } from "./ResetBlockTypeItem";

// To avoid rendering issues, it's good practice to define your custom drag
// handle menu in a separate component, instead of inline within the `sideMenu`
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// AUTO-GENERATED FILE, DO NOT EDIT DIRECTLY
import React from "react";
import { createRoot } from "react-dom/client";
import App from "./App.jsx";
import App from "./src/App.jsx";

const root = createRoot(document.getElementById("root")!);
root.render(
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// AUTO-GENERATED FILE, DO NOT EDIT DIRECTLY
import React from "react";
import { createRoot } from "react-dom/client";
import App from "./App.jsx";
import App from "./src/App.jsx";

const root = createRoot(document.getElementById("root")!);
root.render(
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// AUTO-GENERATED FILE, DO NOT EDIT DIRECTLY
import React from "react";
import { createRoot } from "react-dom/client";
import App from "./App.jsx";
import App from "./src/App.jsx";

const root = createRoot(document.getElementById("root")!);
root.render(
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// AUTO-GENERATED FILE, DO NOT EDIT DIRECTLY
import React from "react";
import { createRoot } from "react-dom/client";
import App from "./App.jsx";
import App from "./src/App.jsx";

const root = createRoot(document.getElementById("root")!);
root.render(
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// AUTO-GENERATED FILE, DO NOT EDIT DIRECTLY
import React from "react";
import { createRoot } from "react-dom/client";
import App from "./App.jsx";
import App from "./src/App.jsx";

const root = createRoot(document.getElementById("root")!);
root.render(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import {
useCreateBlockNote,
} from "@blocknote/react";

import { Mention } from "./Mention.js";
import { Mention } from "./Mention";

// Our schema with inline content specs, which contain the configs and
// implementations for inline content that we want our editor to use.
Expand All @@ -27,7 +27,7 @@ const schema = BlockNoteSchema.create({

// Function which gets all users for the mentions menu.
const getMentionMenuItems = (
editor: typeof schema.BlockNoteEditor
editor: typeof schema.BlockNoteEditor,
): DefaultReactGridSuggestionItem[] => {
const users = ["Steve", "Bob", "Joe", "Mike"];

Expand Down Expand Up @@ -95,7 +95,7 @@ export function App() {
...item,
title: item.id,
})),
query
query,
) as DefaultReactGridSuggestionItem[]
}
columns={2}
Expand Down
2 changes: 1 addition & 1 deletion examples/03-ui-components/11-uppy-file-panel/main.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// AUTO-GENERATED FILE, DO NOT EDIT DIRECTLY
import React from "react";
import { createRoot } from "react-dom/client";
import App from "./App.jsx";
import App from "./src/App.jsx";

const root = createRoot(document.getElementById("root")!);
root.render(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ import {
useCreateBlockNote,
} from "@blocknote/react";

import { FileReplaceButton } from "./FileReplaceButton.js";
import { uploadFile, UppyFilePanel } from "./UppyFilePanel.js";
import { FileReplaceButton } from "./FileReplaceButton";
import { uploadFile, UppyFilePanel } from "./UppyFilePanel";

export default function App() {
// Creates a new editor instance.
Expand Down Expand Up @@ -44,7 +44,7 @@ export default function App() {
items.splice(
items.findIndex((c) => c.key === "replaceFileButton"),
1,
<FileReplaceButton key={"fileReplaceButton"} />
<FileReplaceButton key={"fileReplaceButton"} />,
);

return <FormattingToolbar {...props}>{items}</FormattingToolbar>;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import { useEffect, useState } from "react";

import { RiImageEditFill } from "react-icons/ri";

import { UppyFilePanel } from "./UppyFilePanel.js";
import { UppyFilePanel } from "./UppyFilePanel";

// Copied with minor changes from:
// https://github.com/TypeCellOS/BlockNote/blob/main/packages/react/src/components/FormattingToolbar/DefaultButtons/FileReplaceButton.tsx
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// AUTO-GENERATED FILE, DO NOT EDIT DIRECTLY
import React from "react";
import { createRoot } from "react-dom/client";
import App from "./App.jsx";
import App from "./src/App.jsx";

const root = createRoot(document.getElementById("root")!);
root.render(
Expand Down
2 changes: 1 addition & 1 deletion examples/03-ui-components/13-custom-ui/main.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// AUTO-GENERATED FILE, DO NOT EDIT DIRECTLY
import React from "react";
import { createRoot } from "react-dom/client";
import App from "./App.jsx";
import App from "./src/App.jsx";

const root = createRoot(document.getElementById("root")!);
root.render(
Expand Down
Loading
Loading