Uh oh!
There was an error while loading. Please reload this page.
docs: add read-only example - #2612
Conversation
The latest updates on your projects. Learn more about Vercel for GitHub.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (1)
✅ Files skipped from review due to trivial changes (1)
📝 WalkthroughWalkthroughAdds a new "Read-only Editor" example with full project files (App component, entry points, build/config), documentation, and package metadata. The playground registry was updated to include the new example and a shadowdom example path was corrected. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Poem
🚥 Pre-merge checks | ✅ 1 | ❌ 2❌ Failed checks (1 warning, 1 inconclusive)
✅ Passed checks (1 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 4
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@examples/01-basic/16-read-only-editor/index.html`:
- Line 1: Add the HTML5 DOCTYPE declaration before the existing <html> tag in
the document by inserting <!DOCTYPE html> at the very top of the file so the
page validates with HTMLHint and browsers render in standards mode; ensure the
DOCTYPE appears immediately above the existing <html lang="en"> element.
- Around line 6-8: Replace the invalid HTML comment inside the <script> block in
the file by removing the <!-- AUTO-GENERATED FILE, DO NOT EDIT DIRECTLY --> or
converting it to a valid JavaScript comment; locate the <script> tag in
examples/01-basic/16-read-only-editor/index.html and either delete the commented
line entirely or change it to a JS comment using // or /* */ so the script
contains only valid JavaScript.
In `@examples/01-basic/16-read-only-editor/vite.config.ts`:
- Around line 22-29: The alias mappings for "@blocknote/core" and
"@blocknote/react" in vite.config.ts point to "../../packages/..." but are one
level too shallow; update the path.resolve calls used in the alias object (the
entries for "@blocknote/core" and "@blocknote/react") to use
"../../../packages/..." so they correctly resolve from
examples/01-basic/16-read-only-editor to the repository root.
- Line 17: The path check using fs.existsSync(path.resolve(__dirname,
"../../packages/core/src")) is using the wrong relative depth; update the string
"../../packages/core/src" to "../../../packages/core/src" so it correctly
resolves from examples/01-basic/16-read-only-editor to the repo root packages
directory (i.e., change the path literal used in the fs.existsSync/path.resolve
call in vite.config.ts).
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: a9791640-7ad8-494c-9557-ee50b161520a
📒 Files selected for processing (18)
examples/01-basic/15-shadowdom/.bnexample.jsonexamples/01-basic/15-shadowdom/README.mdexamples/01-basic/15-shadowdom/index.htmlexamples/01-basic/15-shadowdom/main.tsxexamples/01-basic/15-shadowdom/package.jsonexamples/01-basic/15-shadowdom/src/App.tsxexamples/01-basic/15-shadowdom/src/vite-env.d.tsexamples/01-basic/15-shadowdom/tsconfig.jsonexamples/01-basic/15-shadowdom/vite.config.tsexamples/01-basic/16-read-only-editor/.bnexample.jsonexamples/01-basic/16-read-only-editor/README.mdexamples/01-basic/16-read-only-editor/index.htmlexamples/01-basic/16-read-only-editor/main.tsxexamples/01-basic/16-read-only-editor/package.jsonexamples/01-basic/16-read-only-editor/src/App.tsxexamples/01-basic/16-read-only-editor/tsconfig.jsonexamples/01-basic/16-read-only-editor/vite.config.tsplayground/src/examples.gen.tsx
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
@blocknote/ariakit@blocknote/code-block@blocknote/core@blocknote/mantine@blocknote/react@blocknote/server-util@blocknote/shadcn@blocknote/xl-ai@blocknote/xl-docx-exporter@blocknote/xl-email-exporter@blocknote/xl-multi-column@blocknote/xl-odt-exporter@blocknote/xl-pdf-exportercommit: |
Summary
This PR adds a basic read-only editor example to make testing easier.
Rationale
See above.
Changes
See above.
Impact
N/A
Testing
N/A
Screenshots/Video
N/A
Checklist
Additional Notes
Summary by CodeRabbit
New Features
Documentation