diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index b62b934ecb..047c51cfc8 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -11,14 +11,14 @@ jobs: name: Build runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - - uses: actions/setup-node@v3 + - uses: actions/setup-node@v4 with: - node-version: "18.x" + node-version: "20.x" - name: Cache node modules - uses: actions/cache@v3 + uses: actions/cache@v4 env: cache-name: cache-node-modules with: @@ -32,7 +32,7 @@ jobs: - name: cache playwright id: playwright-cache - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: ~/.cache/ms-playwright key: pw-new-${{ runner.os }}-${{ hashFiles('**/package-lock.json') }} @@ -70,7 +70,7 @@ jobs: working-directory: ./tests run: npx playwright test - - uses: actions/upload-artifact@v3 + - uses: actions/upload-artifact@v4 if: always() with: name: playwright-report @@ -80,5 +80,5 @@ jobs: - name: Upload webpack stats artifact (editor) uses: relative-ci/agent-upload-artifact-action@v1 with: - webpackStatsFile: ./examples/editor/dist/webpack-stats.json + webpackStatsFile: ./playground/dist/webpack-stats.json artifactName: relative-ci-artifacts-editor diff --git a/.nvmrc b/.nvmrc index b1215e8764..df9385826f 100644 --- a/.nvmrc +++ b/.nvmrc @@ -1 +1 @@ -v18.16.0 \ No newline at end of file +v20.11.0 \ No newline at end of file diff --git a/README.md b/README.md index 13c8961cdc..665bfb1303 100644 --- a/README.md +++ b/README.md @@ -1,49 +1,45 @@
Welcome to BlockNote! The open source Block-Based -rich text editor. Easily add a modern text editing experience to your app. +React rich text editor. Easily add a modern text editing experience to your app.
Homepage - - Introduction - - Documentation + - + Quickstart + - + Examples
# Live demo -Play with the editor @ [https://playground.blocknotejs.org/](https://playground.blocknotejs.org/). - -(Source in [examples](/examples)) +See our homepage @ [https://www.blocknotejs.org](https://www.blocknotejs.org/) or browse the [examples](https://www.blocknotejs.org/examples). # Example code (React) [](https://badge.fury.io/js/%40blocknote%2Freact) ```typescript -import { BlockNoteView, useBlockNote } from "@blocknote/react"; +import { BlockNoteView, useCreateBlockNote } from "@blocknote/react"; +import "@blocknote/core/fonts/inter.css"; import "@blocknote/react/style.css"; function App() { - const editor = useBlockNote({ - onEditorContentChange: (editor) => { - // Log the document to console on every update - console.log(editor.getJSON()); - }, - }); + const editor = useCreateBlockNote(); return