Skip to content
Merged
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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ Play with the editor @ [https://playground.blocknotejs.org/](https://playground.

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

function App() {
Expand Down
1 change: 1 addition & 0 deletions docs/components/pages/landing/hero/Demo.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { uploadToTmpFilesDotOrg_DEV_ONLY } from "@blocknote/core";
import "@blocknote/core/fonts/inter.css";
import { BlockNoteView, useCreateBlockNote } from "@blocknote/react";
import "@blocknote/react/style.css";
import { useMemo } from "react";
Expand Down
1 change: 1 addition & 0 deletions docs/pages/docs/advanced/nextjs.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ 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, useCreateBlockNote } from "@blocknote/react";
import "@blocknote/core/fonts/inter.css";
import "@blocknote/react/style.css";

// Our <Editor> component we can reuse later
Expand Down
2 changes: 1 addition & 1 deletion docs/pages/docs/quickstart.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ With the `useCreateBlockNote` hook, we can create a new editor instance, then us

<Example name="basic/minimal" />

We also import `@blocknote/react/style.css` to add default styling for the editor.
We also import `@blocknote/react/style.css` to add default styling for the editor and the `Inter` font that BlockNote exports (optional).

<Callout type="warning" emoji={""}>
<strong>Next.js usage (or other server-side React frameworks)</strong>
Expand Down
1 change: 1 addition & 0 deletions examples/01-basic/01-minimal/App.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import "@blocknote/core/fonts/inter.css";
import { BlockNoteView, useCreateBlockNote } from "@blocknote/react";
import "@blocknote/react/style.css";

Expand Down
1 change: 1 addition & 0 deletions examples/01-basic/02-block-objects/App.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { Block } from "@blocknote/core";
import "@blocknote/core/fonts/inter.css";
import { BlockNoteView, useCreateBlockNote } from "@blocknote/react";
import "@blocknote/react/style.css";
import { useState } from "react";
Expand Down
1 change: 1 addition & 0 deletions examples/01-basic/03-all-blocks/App.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import "@blocknote/core/fonts/inter.css";
import { BlockNoteView, useCreateBlockNote } from "@blocknote/react";
import "@blocknote/react/style.css";

Expand Down
1 change: 1 addition & 0 deletions examples/01-basic/05-block-manipulation/App.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import "@blocknote/core/fonts/inter.css";
import { BlockNoteView, useCreateBlockNote } from "@blocknote/react";
import "@blocknote/react/style.css";

Expand Down
1 change: 1 addition & 0 deletions examples/01-basic/06-file-uploading/App.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import "@blocknote/core/fonts/inter.css";
import { BlockNoteView, useCreateBlockNote } from "@blocknote/react";
import "@blocknote/react/style.css";

Expand Down
1 change: 1 addition & 0 deletions examples/01-basic/07-saving-loading/App.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { Block, BlockNoteEditor, PartialBlock } from "@blocknote/core";
import "@blocknote/core/fonts/inter.css";
import { BlockNoteView } from "@blocknote/react";
import "@blocknote/react/style.css";
import { useEffect, useMemo, useState } from "react";
Expand Down
1 change: 1 addition & 0 deletions examples/01-basic/testing/App.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { uploadToTmpFilesDotOrg_DEV_ONLY } from "@blocknote/core";
import "@blocknote/core/fonts/inter.css";
import { BlockNoteView, useCreateBlockNote } from "@blocknote/react";
import "@blocknote/react/style.css";

Expand Down
1 change: 1 addition & 0 deletions examples/02-ui-components/01-ui-elements-remove/App.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import "@blocknote/core/fonts/inter.css";
import { BlockNoteView, useCreateBlockNote } from "@blocknote/react";
import "@blocknote/react/style.css";

Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import "@blocknote/core/fonts/inter.css";
import {
BasicTextStyleButton,
BlockNoteView,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
import { BlockNoteSchema, defaultBlockSpecs } from "@blocknote/core";
import "@blocknote/core/fonts/inter.css";
import {
BlockNoteView,
BlockTypeDropdownItem,
blockTypeDropdownItems,
FormattingToolbar,
FormattingToolbarController,
blockTypeDropdownItems,
useCreateBlockNote,
} from "@blocknote/react";
import "@blocknote/react/style.css";
Expand Down
1 change: 1 addition & 0 deletions examples/02-ui-components/04-side-menu-buttons/App.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import "@blocknote/core/fonts/inter.css";
import {
BlockNoteView,
DragHandleButton,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import "@blocknote/core/fonts/inter.css";
import {
BlockColorsItem,
BlockNoteView,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import {
filterSuggestionItems,
PartialBlock,
} from "@blocknote/core";
import "@blocknote/core/fonts/inter.css";
import {
BlockNoteView,
DefaultReactSuggestionItem,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import "@blocknote/core/fonts/inter.css";
import {
BlockNoteView,
DefaultReactSuggestionItem,
Expand Down
1 change: 1 addition & 0 deletions examples/02-ui-components/08-custom-ui/App.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { filterSuggestionItems } from "@blocknote/core";
import "@blocknote/core/fonts/inter.css";
import {
BlockNoteView,
getDefaultReactSlashMenuItems,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import "@blocknote/core/fonts/inter.css";
import {
BlockNoteView,
HyperlinkToolbar,
Expand Down
1 change: 1 addition & 0 deletions examples/03-theming/01-theming-dom-attributes/App.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import "@blocknote/core/fonts/inter.css";
import { BlockNoteView, useCreateBlockNote } from "@blocknote/react";
import "@blocknote/react/style.css";

Expand Down
1 change: 1 addition & 0 deletions examples/03-theming/02-changing-font/App.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import "@blocknote/core/fonts/inter.css";
import { BlockNoteView, useCreateBlockNote } from "@blocknote/react";
import "@blocknote/react/style.css";

Expand Down
1 change: 1 addition & 0 deletions examples/03-theming/03-theming-css/App.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import "@blocknote/core/fonts/inter.css";
import { BlockNoteView, useCreateBlockNote } from "@blocknote/react";
import "@blocknote/react/style.css";

Expand Down
1 change: 1 addition & 0 deletions examples/03-theming/04-theming-css-variables/App.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import "@blocknote/core/fonts/inter.css";
import { BlockNoteView, useCreateBlockNote } from "@blocknote/react";
import "@blocknote/react/style.css";

Expand Down
1 change: 1 addition & 0 deletions examples/03-theming/05-theming-css-variables-code/App.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import "@blocknote/core/fonts/inter.css";
import {
BlockNoteView,
darkDefaultTheme,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import "@blocknote/core/fonts/inter.css";
import { BlockNoteView, useCreateBlockNote } from "@blocknote/react";
import "@blocknote/react/style.css";
import { useState } from "react";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import "@blocknote/core/fonts/inter.css";
import { BlockNoteView, useCreateBlockNote } from "@blocknote/react";
import "@blocknote/react/style.css";
import { ChangeEvent, useCallback, useEffect } from "react";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import "@blocknote/core/fonts/inter.css";
import { BlockNoteView, useCreateBlockNote } from "@blocknote/react";
import "@blocknote/react/style.css";
import { useState } from "react";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import "@blocknote/core/fonts/inter.css";
import { BlockNoteView, useCreateBlockNote } from "@blocknote/react";
import "@blocknote/react/style.css";
import { ChangeEvent, useCallback, useEffect } from "react";
Expand Down
1 change: 1 addition & 0 deletions examples/05-custom-schema/01-alert-block/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import {
filterSuggestionItems,
insertOrUpdateBlock,
} from "@blocknote/core";
import "@blocknote/core/fonts/inter.css";
import {
BlockNoteView,
SuggestionMenuController,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import {
defaultInlineContentSpecs,
filterSuggestionItems,
} from "@blocknote/core";
import "@blocknote/core/fonts/inter.css";
import {
BlockNoteView,
DefaultReactSuggestionItem,
Expand Down
1 change: 1 addition & 0 deletions examples/05-custom-schema/03-font-style/App.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { BlockNoteSchema, defaultStyleSpecs } from "@blocknote/core";
import "@blocknote/core/fonts/inter.css";
import {
BasicTextStyleButton,
BlockNoteView,
Expand Down
1 change: 1 addition & 0 deletions examples/05-custom-schema/react-custom-blocks/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import {
defaultBlockSpecs,
defaultProps,
} from "@blocknote/core";
import "@blocknote/core/fonts/inter.css";
import {
BlockNoteView,
createReactBlockSpec,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { BlockNoteSchema, defaultInlineContentSpecs } from "@blocknote/core";
import "@blocknote/core/fonts/inter.css";
import {
BlockNoteView,
createReactInlineContentSpec,
Expand Down
1 change: 1 addition & 0 deletions examples/05-custom-schema/react-custom-styles/App.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { BlockNoteSchema, defaultStyleSpecs } from "@blocknote/core";
import "@blocknote/core/fonts/inter.css";
import {
BlockNoteView,
FormattingToolbar,
Expand Down
2 changes: 1 addition & 1 deletion examples/06-collaboration/01-partykit/.bnexample.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"author": "matthewlipski",
"tags": ["Advanced", "Saving/Loading", "Collaboration"],
"dependencies": {
"y-partykit": "^0.0.10",
"y-partykit": "^0.0.25",
"yjs": "^13.6.1"
}
}
1 change: 1 addition & 0 deletions examples/06-collaboration/01-partykit/App.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import "@blocknote/core/fonts/inter.css";
import { BlockNoteView, useCreateBlockNote } from "@blocknote/react";
import "@blocknote/react/style.css";
import YPartyKitProvider from "y-partykit/provider";
Expand Down
2 changes: 1 addition & 1 deletion examples/06-collaboration/01-partykit/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"@blocknote/react": "^0.11.1",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"y-partykit": "^0.0.10",
"y-partykit": "^0.0.25",
"yjs": "^13.6.1"
},
"devDependencies": {
Expand Down
1 change: 1 addition & 0 deletions examples/06-collaboration/02-liveblocks/App.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import "@blocknote/core/fonts/inter.css";
import { BlockNoteView, useCreateBlockNote } from "@blocknote/react";
import "@blocknote/react/style.css";
import { createClient } from "@liveblocks/client";
Expand Down
1 change: 1 addition & 0 deletions examples/vanilla-js/react-vanilla-custom-blocks/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import {
defaultBlockSpecs,
defaultProps,
} from "@blocknote/core";
import "@blocknote/core/fonts/inter.css";
import { BlockNoteView, useCreateBlockNote } from "@blocknote/react";
import "@blocknote/react/style.css";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import {
createInlineContentSpec,
defaultInlineContentSpecs,
} from "@blocknote/core";
import "@blocknote/core/fonts/inter.css";
import { BlockNoteView, useCreateBlockNote } from "@blocknote/react";
import "@blocknote/react/style.css";

Expand Down
1 change: 1 addition & 0 deletions examples/vanilla-js/react-vanilla-custom-styles/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import {
createStyleSpec,
defaultStyleSpecs,
} from "@blocknote/core";
import "@blocknote/core/fonts/inter.css";
import {
BlockNoteView,
FormattingToolbar,
Expand Down
4 changes: 4 additions & 0 deletions packages/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,10 @@
"./style.css": {
"import": "./dist/style.css",
"require": "./dist/style.css"
},
"./fonts/inter.css": {
"import": "./src/fonts/inter.css",
"require": "./src/fonts/inter.css"
}
},
"scripts": {
Expand Down
1 change: 0 additions & 1 deletion packages/core/src/editor/editor.css
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
@import url("../assets/fonts-inter.css");
@import url("prosemirror-tables/style/tables.css");

.bn-editor {
Expand Down