Repository navigation
fix(react): mount editable inline content inside its contentRef - #3252
advance-hub wants to merge 1 commit into
Conversation
|
@advance-hub is attempting to deploy a commit to the TypeCell Team on Vercel. A member of the Team first needs to authorize it. |
|
No actionable comments were generated in the recent review.
|
| Layer / File(s) | Summary |
|---|---|
Mark and validate inline content targets packages/react/src/schema/ReactInlineContentSpec.tsx, packages/react/src/schema/ReactInlineContentSpec.test.tsx, packages/react/src/schema/ReactInlineContentSpec.browser.test.tsx |
The contentRef callback adds data-node-view-content to its target. Tests cover styled and plain specs, and check rendered content and editor.document after text is added to inline tags. |
Priority:
Estimated code review effort: 2 (Simple) | ~10 minutes
Change: Bug fix · Severity of issue fixed: Medium
Possibly related PRs
- TypeCellOS/BlockNote#3251: Sets the same marker on the
contentRefelement and also changes inline-spec extension registration.
Suggested reviewers: nperez0111
Merge Risk: 
Minimal · up to 7ecbe
-
The inline-content fix is ready to merge after normal checks; no outstanding defect is established.
Pre-merge checks: 
4 · 
1
-
Failed checks: 1 warning Passed checks: 4 passed-
Full details: Description check
-
Explanation
The description includes the required summary, rationale, changes, impact, testing, checklist, and additional notes. It clearly documents the unrun full workspace suite and explains why documentation was not updated.
Full details: Linked Issues check
-
Explanation
Issue
#2142requires newly inserted custom inline content to remain editable and to export its text in the editor document.ReactInlineContentSpec.tsxmarks the livecontentReftarget withdata-node-view-contentanddata-editable. The added unit test covers styled and plain inline content. The browser test covers initial content, inserted empty content, and inserted text, and verifies both visible text andeditor.documentcontent.
Full details: Out of Scope Changes check
-
Explanation
The implementation change directly addresses issue
#2142. The added unit and browser tests verify the required rendering and document synchronization behavior. No unrelated production changes are shown in the reviewed files.
-
-
Finishing Touches: 💡 1
-
🛠️ Fix failing CI checks: 💡
-
- Commit to this branch
- Create a new PR
🧪 Generate unit tests (beta)
-
- Create a new PR
-
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
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.
A rabbit taps the tag with care,
New letters settle, bright and clear.
The view reflects each typed-in line,
The document keeps the same design.
Then hops away, content in tow.
Comment @coderabbitai help to get the list of available commands.
|
This was fiexed by #3251 independently |
Summary
Fixes #2142. Newly inserted editable React inline content now renders and edits inside its
contentRefelement, keeping the visible text andeditor.documentin sync.Rationale
The first React ref can run before Tiptap creates the content DOM. Without a node-view content marker, Tiptap appends that DOM beside the React wrapper. Inserting a custom tag with text then leaves its intended editable element empty.
Changes
contentRefelement as Tiptap's content target, matching React blocks.Impact
This repairs the live content-DOM attachment for editable React inline content. The browser fixture uses the visible inline-block dimensions from the issue's reproduction.
Testing
git diff --checkpassed.The full workspace suite was not run.
Screenshots/Video
Not applicable; the browser tests cover rendering and editing behavior.
Checklist
Additional Notes
The related React unit suite and targeted browser tests pass. A documentation update is not needed for this bug fix.
AI disclosure: Codex assisted with investigation, implementation, tests and this PR description.
Summary by CodeRabbit