Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
54 commits
Select commit Hold shift + click to select a range
2e0455e
Cleaned up UI components and examples
matthewlipski Feb 16, 2024
dffefbb
Continued cleanup
matthewlipski Feb 16, 2024
38abe61
Continued cleanup
matthewlipski Feb 16, 2024
6ddf346
Continued cleanup
matthewlipski Feb 19, 2024
71692ff
Imlemented PR feedback
matthewlipski Feb 20, 2024
7cb50be
add default onItemClick
YousefED Feb 20, 2024
b39f585
Implemented PR feedback
matthewlipski Feb 20, 2024
df5d145
Small fix
matthewlipski Feb 20, 2024
0e4a3eb
fix build
YousefED Feb 20, 2024
491ae80
Merge branch 'nextjs-ui-cleanup' of github.com:TypeCellOS/BlockNote i…
YousefED Feb 20, 2024
ce35dcd
remove file
YousefED Feb 20, 2024
a65fcb1
Rename
matthewlipski Feb 20, 2024
ca6b76d
Merge remote-tracking branch 'origin/nextjs-ui-cleanup' into nextjs-u…
matthewlipski Feb 20, 2024
ed8fa46
fix image caption button
YousefED Feb 20, 2024
53b8353
Merge remote-tracking branch 'origin/nextjs-ui-cleanup' into nextjs-u…
matthewlipski Feb 20, 2024
d5da862
Moved components requiring Mantine to `/mantine` directories
matthewlipski Feb 20, 2024
43a5c19
Small fix
matthewlipski Feb 20, 2024
e00fe19
Updated formatting toolbar & side menu docs
matthewlipski Feb 21, 2024
b155874
suggestion (#588)
YousefED Feb 21, 2024
0a61a33
Added hyperlink toolbar docs and small changes
matthewlipski Feb 21, 2024
1bcc205
Updated slash menu docs & small fixes
matthewlipski Feb 21, 2024
9576bbf
Updated slash menu docs & small fixes
matthewlipski Feb 21, 2024
009765d
Merge remote-tracking branch 'origin/nextjs-ui-cleanup' into nextjs-u…
matthewlipski Feb 21, 2024
eab38cb
wip
YousefED Feb 21, 2024
9fc0f3a
update scripts
YousefED Feb 22, 2024
d6f910d
fix
YousefED Feb 22, 2024
c9d67fb
fix
YousefED Feb 22, 2024
940700e
remove files
YousefED Feb 22, 2024
b001c8a
fix
YousefED Feb 22, 2024
6659cff
update names
YousefED Feb 22, 2024
8e62462
small fixes
YousefED Feb 22, 2024
545249f
docs
YousefED Feb 22, 2024
daebd6f
as discussed
YousefED Feb 22, 2024
b4ccb8d
address comments
YousefED Feb 22, 2024
7746419
Merge branch 'nextjs-ui-cleanup' into editor-schema
YousefED Feb 22, 2024
3ad317d
Merge pull request #590 from TypeCellOS/editor-schema
YousefED Feb 22, 2024
2791350
Added initial content to UI component examples & small changes
matthewlipski Feb 22, 2024
a544825
Cleaned up UI component docs
matthewlipski Feb 22, 2024
f643961
custom schemas + custom blocks page
YousefED Feb 23, 2024
7cb62f4
Merge branch 'nextjs-ui-cleanup' of github.com:TypeCellOS/BlockNote i…
YousefED Feb 23, 2024
8f1a7d4
fix
YousefED Feb 23, 2024
bcb851f
update slash menu docs
YousefED Feb 23, 2024
febf6c8
move some examples
YousefED Feb 23, 2024
50d95c7
rename slash menu to suggestion menu
YousefED Feb 23, 2024
abaafe4
Added custom inline content page and other fixes
matthewlipski Feb 23, 2024
e9b7025
Merge remote-tracking branch 'origin/nextjs-ui-cleanup' into nextjs-u…
matthewlipski Feb 23, 2024
423aa91
fix
YousefED Feb 23, 2024
087b615
theming todos
YousefED Feb 23, 2024
8ca8c8a
Made discussed changes to styling & theming docs
matthewlipski Feb 23, 2024
4633fcd
address feedback
YousefED Feb 23, 2024
5317dae
Added custom styles docs
matthewlipski Feb 23, 2024
2e40ae8
Fixed theming & styling demos
matthewlipski Feb 23, 2024
6fe628a
Updated advanced docs
matthewlipski Feb 23, 2024
eaaf768
docs: Proposal for editor basics docs changes (#594)
matthewlipski Feb 28, 2024
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
  •  
  •  
  •  
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,11 @@ Play with the editor @ [https://playground.blocknotejs.org/](https://playground.
[![npm version](https://badge.fury.io/js/%40blocknote%2Freact.svg)](https://badge.fury.io/js/%40blocknote%2Freact)

```typescript
import { BlockNoteView, useBlockNote } from "@blocknote/react";
import { BlockNoteView, useCreateBlockNote } from "@blocknote/react";
import "@blocknote/react/style.css";

function App() {
const editor = useBlockNote({
const editor = useCreateBlockNote({
onEditorContentChange: (editor) => {
// Log the document to console on every update
console.log(editor.getJSON());
Expand Down
3 changes: 1 addition & 2 deletions docs/api/og.tsx → docs/api/og.tsx.bak
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
import { ImageResponse } from "@vercel/og";
import React from "react";

export const config = {
runtime: "edge",
};

const font = fetch(
new URL("../docs/public/fonts/Gilroy-Regular.ttf", import.meta.url)
new URL("../../assets/fonts/Gilroy-Regular.ttf", import.meta.url),
).then((res) => res.arrayBuffer());

export default async function handler(request: { url: string }) {
Expand Down
File renamed without changes.
10 changes: 3 additions & 7 deletions docs/components/pages/landing/hero/Demo.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { uploadToTmpFilesDotOrg_DEV_ONLY } from "@blocknote/core";
import { BlockNoteView, useBlockNote } from "@blocknote/react";
import { BlockNoteView, useCreateBlockNote } from "@blocknote/react";
import "@blocknote/react/style.css";
import { useMemo } from "react";
import YPartyKitProvider from "y-partykit/provider";
Expand Down Expand Up @@ -53,11 +53,7 @@ function getUTCDateYYYYMMDD() {
return `${year}${formattedMonth}${formattedDay}`;
}

export function ReactBlockNote(props: {
theme: "light" | "dark";
}) {


export function ReactBlockNote(props: { theme: "light" | "dark" }) {
const [doc, provider] = useMemo(() => {
console.log("create");
const doc = new Y.Doc();
Expand All @@ -70,7 +66,7 @@ export function ReactBlockNote(props: {
return [doc, provider];
}, []);

const editor = useBlockNote(
const editor = useCreateBlockNote(
{
collaboration: {
provider,
Expand Down
29 changes: 16 additions & 13 deletions docs/next.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -20,19 +20,20 @@ const withAnalyzer = analyzer({ enabled: false });

const nextConfig = withAnalyzer(
withNextra({
// transpilePackages: ["@blocknote/example-react-custom-styles"],
images: {
remotePatterns: [
{
protocol: 'https',
hostname: 'avatars.githubusercontent.com',
port: '',
pathname: '/u/**',
protocol: "https",
hostname: "avatars.githubusercontent.com",
port: "",
pathname: "/u/**",
},
{
protocol: 'https',
hostname: 'github.com',
port: '',
pathname: '/**',
protocol: "https",
hostname: "github.com",
port: "",
pathname: "/**",
},
],
},
Expand All @@ -55,14 +56,16 @@ const nextConfig = withAnalyzer(
vendor: {
test: (module) => {
// console.log(module.resource);
if (module.resource?.includes("blocknote") || module.resource?.includes("mantine")) {

if (
module.resource?.includes("blocknote") ||
module.resource?.includes("mantine")
) {
return true;
}
return false;
},
name: 'blocknotechunk',
chunks: 'all',
name: "blocknotechunk",
chunks: "all",
},
},
};
Expand All @@ -77,7 +80,7 @@ const nextConfig = withAnalyzer(
// "@blocknote/react": path.resolve(__dirname, "../packages/react/src/"),
};
},
})
}),
);

export default nextConfig;
4 changes: 2 additions & 2 deletions docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@
"private": true,
"scripts": {
"dev": "next dev",
"build": "next build",
"docs:build": "next build",
"start": "next start",
"lint": "next lint"
},
"dependencies": {
"@blocknote/core": "*",
"@blocknote/react": "*",
"@headlessui/react": "^1.7.18",
"@mantine/core": "^7.4.2",
"@mantine/core": "^7.5.0",
"@next/bundle-analyzer": "^14.1.0",
"@vercel/og": "^0.6.2",
"classnames": "2.3.2",
Expand Down
5 changes: 3 additions & 2 deletions docs/pages/docs/_meta.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
{

"index": "Introduction",
"quickstart":"",
"quickstart": "Quickstart",
"editor-basics": "Editor Basics",
"editor-api": "Editor API",
"styling-theming": "Styling & Theming",
"ui-components": "UI Components",
"custom-schemas": "Custom Schemas",
"advanced": "Advanced",
Expand Down
4 changes: 2 additions & 2 deletions docs/pages/docs/advanced/nextjs.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@ Make sure to use BlockNote in a [Client Component](https://nextjs.org/docs/getti

```typescript jsx
"use client"; // this registers <Editor> as a Client Component
import { BlockNoteView, useBlockNote } from "@blocknote/react";
import { BlockNoteView, useCreateBlockNote } from "@blocknote/react";
import "@blocknote/react/style.css";

// Our <Editor> component we can reuse later
export default function Editor() {
// Creates a new editor instance.
const editor = useBlockNote({});
const editor = useCreateBlockNote();

// Renders the editor instance using a React component.
return <BlockNoteView editor={editor} />;
Expand Down
Loading