-
-
Notifications
You must be signed in to change notification settings - Fork 606
Refactor/cleanup mount system #567
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
Merged
matthewlipski
merged 21 commits into
refactor/playground-nextjs
from
refactor/cleanup-mount-system
Feb 13, 2024
Merged
Changes from all commits
Commits
Show all changes
21 commits
Select commit
Hold shift + click to select a range
65fb330
cleanup mount system
YousefED 4c7ef0d
merge
YousefED 8848874
Merge branch 'refactor/playground-nextjs' into refactor/cleanup-mount…
YousefED ca0391a
demo
YousefED d054318
wip
YousefED a55085a
fix build
YousefED fa99750
fix
YousefED 25b221b
fix light / dark mode
YousefED 28fea81
Merge branch 'refactor/playground-nextjs' into refactor/cleanup-mount…
YousefED d959e5f
clean examples
YousefED 97251a8
clean examples
YousefED c0c9d99
docs
YousefED 8ac74e2
misc
YousefED 7714c37
refs
YousefED 33fec47
better errors
YousefED 3a14157
add default block / partialblock types
YousefED 00ed85b
wip: examples
YousefED d05daf2
Merge branch 'refactor/playground-nextjs' into refactor/cleanup-mount…
YousefED 18c3c5b
fix theme
YousefED 961134a
update interop examples
YousefED 63de6af
Small fixes
matthewlipski File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
"use client"; | ||
import { BlockNoteContext } from "@blocknote/react"; | ||
import { useTheme } from "nextra-theme-docs"; | ||
import { examples } from "./generated/exampleComponents.gen"; | ||
|
||
export default function ThemedExample(props: { name: keyof typeof examples }) { | ||
const example = examples[props.name]; | ||
const App = example.App; | ||
const { theme } = useTheme(); | ||
|
||
return ( | ||
<BlockNoteContext.Provider | ||
value={{ colorSchemePreference: theme === "dark" ? "dark" : "light" }}> | ||
<App /> | ||
</BlockNoteContext.Provider> | ||
); | ||
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,4 @@ | ||
{ | ||
"playground": true, | ||
"docs": false, | ||
"group": "Basic Examples", | ||
"order": 1 | ||
"docs": true | ||
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,10 @@ | ||
import { uploadToTmpFilesDotOrg_DEV_ONLY } from "@blocknote/core"; | ||
import { BlockNoteView, useBlockNote } from "@blocknote/react"; | ||
import "@blocknote/react/style.css"; | ||
|
||
export default function App() { | ||
// Creates a new editor instance. | ||
const editor = useBlockNote({ | ||
domAttributes: { | ||
editor: { | ||
class: "editor", | ||
"data-test": "editor", | ||
}, | ||
}, | ||
uploadFile: uploadToTmpFilesDotOrg_DEV_ONLY, | ||
}); | ||
const editor = useBlockNote({}); | ||
|
||
// Renders the editor instance using a React component. | ||
return <BlockNoteView className="root" editor={editor} />; | ||
return <BlockNoteView editor={editor} />; | ||
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,3 @@ | ||
# Basic Editor Setup | ||
|
||
This example shows the minimal code required to setup your React rich text editor with BlockNote. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{ | ||
"playground": true, | ||
"docs": true | ||
} |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.